summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/getpwent.c
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1996-04-29 14:48:47 +0000
committerwpaul <wpaul@FreeBSD.org>1996-04-29 14:48:47 +0000
commiteb2fc8df69f0094c2ebaa570d6090a682184f2c5 (patch)
tree13ca0d8117877c1fdc07361ef157ab81157b731c /lib/libc/gen/getpwent.c
parent1a4cbf6251491e758cca757e635f69e373fecd67 (diff)
downloadFreeBSD-src-eb2fc8df69f0094c2ebaa570d6090a682184f2c5.zip
FreeBSD-src-eb2fc8df69f0094c2ebaa570d6090a682184f2c5.tar.gz
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
Diffstat (limited to 'lib/libc/gen/getpwent.c')
-rw-r--r--lib/libc/gen/getpwent.c2
1 files changed, 1 insertions, 1 deletions
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);
}
OpenPOWER on IntegriCloud