From eb2fc8df69f0094c2ebaa570d6090a682184f2c5 Mon Sep 17 00:00:00 2001 From: wpaul Date: Mon, 29 Apr 1996 14:48:47 +0000 Subject: Very minor tweak: In __initdb(), a failure to open the local password database is supposed to result in a warning message being syslog()ed. This warning is only supposed to be generated as long as the 'warned' flag hasn't been yet; once the warning is generated, the flag should be set so that the message is only syslog()ed once. However, while the state of the flag is checked properly, the flag's state is never changed, so you always get multiple warnings instead of just one. Pointed out by: Peter Wemm --- lib/libc/gen/getpwent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libc') diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c index 2e2005f..052d150 100644 --- a/lib/libc/gen/getpwent.c +++ b/lib/libc/gen/getpwent.c @@ -268,7 +268,7 @@ __initdb() #endif return(1); } - if (!warned) + if (!warned++) syslog(LOG_ERR, "%s: %m", p); return(0); } -- cgit v1.1