Fixed all warnings in code.
[awesomized/libmemcached] / lib / memcached_flush.c
index f7527a7c31eb42ebfc3070ea0118ab3a70e2f745..8c51cdf1f85f8e9e44d3fa7a67fb673aac42aa52 100644 (file)
@@ -16,16 +16,12 @@ memcached_return memcached_flush(memcached_st *ptr, time_t expiration)
   {
     if (expiration)
       send_length= snprintf(buffer, MEMCACHED_DEFAULT_COMMAND_SIZE, 
-                            "flush_all %u\r\n", expiration);
+                            "flush_all %llu\r\n", (unsigned long long)expiration);
     else
       send_length= snprintf(buffer, MEMCACHED_DEFAULT_COMMAND_SIZE, 
                             "flush_all\r\n");
-    if ((send(ptr->hosts[x].fd, buffer, send_length, 0) == -1))
-    {
-      fprintf(stderr, "failed flush_all TCP\n");
-
+    if ((write(ptr->hosts[x].fd, buffer, send_length) == -1))
       return MEMCACHED_WRITE_FAILURE;
-    }
 
     rc= memcached_response(ptr, buffer, MEMCACHED_DEFAULT_COMMAND_SIZE, x);