浏览代码

minor perror behavior fix

patch by nsz
Rich Felker 12 年之前
父节点
当前提交
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);