Просмотр исходного кода

minor perror behavior fix

patch by nsz
Rich Felker 12 лет назад
Родитель
Сommit
82a4499e67
1 измененных файлов с 1 добавлено и 1 удалено
  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);