Use perror() rather than puts().
authordrepper <drepper>
Sun, 27 May 2001 06:53:59 +0000 (06:53 +0000)
committerdrepper <drepper>
Sun, 27 May 2001 06:53:59 +0000 (06:53 +0000)
manual/examples/dir.c

index b90f72d..59ec62c 100644 (file)
@@ -19,7 +19,7 @@ main (void)
       (void) closedir (dp);
     }
   else
-    puts ("Couldn't open the directory.");
+    perror ("Couldn't open the directory");
 
   return 0;
 }