add lcov and lcov-clean target
[m6w6/libmemcached] / example / memcached_light.c
index d88e5861a97a76c80a8455b0a72d2ffc061b060c..4a53217ab831dfd966cae7cc9990c4455770da7d 100644 (file)
@@ -285,10 +285,12 @@ int main(int argc, char **argv)
     uint32_t pid;
 
     pid_file= fopen(global_options.pid_file, "w+");
-    perror(strerror(errno));
 
     if (pid_file == NULL)
+    {
+      perror(strerror(errno));
       abort();
+    }
 
     pid= (uint32_t)getpid();
     fprintf(pid_file, "%u\n", pid);