Standardize the snprintf() failure messages, and add tests for libmemcached_util_getpid()
[awesomized/libmemcached] / libmemcached / connect.cc
index 43924116fc69f20919bf7b01b30c4385528bc54e..dee0cd7b1124a67036a014e751d74a5a19469797 100644 (file)
@@ -135,7 +135,9 @@ static memcached_return_t set_hostinfo(memcached_server_st *server)
   char str_port[NI_MAXSERV];
   int length= snprintf(str_port, NI_MAXSERV, "%u", (uint32_t)server->port);
   if (length >= NI_MAXSERV || length < 0)
+  {
     return MEMCACHED_FAILURE;
+  }
 
   struct addrinfo hints;
   memset(&hints, 0, sizeof(struct addrinfo));