minor perror behavior fix
authorRich Felker <dalias@aerifal.cx>
Wed, 20 Jun 2012 13:27:28 +0000 (09:27 -0400)
committerRich Felker <dalias@aerifal.cx>
Wed, 20 Jun 2012 13:27:28 +0000 (09:27 -0400)
patch by nsz

src/stdio/perror.c

index 4349ac5..fdcb4d7 100644 (file)
@@ -10,7 +10,7 @@ void perror(const char *msg)
 
        FLOCK(f);
        
-       if (msg) {
+       if (msg && *msg) {
                fwrite(msg, strlen(msg), 1, f);
                fputc(':', f);
                fputc(' ', f);