cppcheck: fix warnings
[awesomized/libmemcached] / util / instance.cc
index 8b9f5ee94afa5da24dd60f8600868a21c131836a..8f5d17383d95d3add0c7e5f0c6a693178328e8ff 100644 (file)
@@ -36,7 +36,7 @@
  */
 
 
-#include <config.h>
+#include "mem_config.h"
 
 #include "util/instance.hpp"
 
 #include <sys/types.h>
 
 #ifdef HAVE_UNISTD_H
-#include <unistd.h>
+# include <unistd.h>
+#endif
+
+#ifndef INVALID_SOCKET
+# define INVALID_SOCKET -1
+#endif
+
+#ifndef SOCKET_ERROR
+# define SOCKET_ERROR -1
+#endif
+
+#ifndef get_socket_errno
+# define get_socket_errno() errno
+#endif
+
+#ifndef closesocket
+# define closesocket(a) close(a)
 #endif
 
 
@@ -135,7 +151,7 @@ bool Instance::run()
         return false;
       }
       _addrinfo_next= _addrinfo_next->ai_next;
-
+      /* fall through */
 
     case CONNECT:
       close_socket();