Browse Source

minor perror behavior fix

patch by nsz
Rich Felker 12 years ago
parent
commit
82a4499e67
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/stdio/perror.c

+ 1 - 1
src/stdio/perror.c

@@ -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);