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
This commit is contained in:
Bill Paul 1996-04-29 14:48:47 +00:00
parent 1966645d08
commit 88ce2dd1ef

View File

@ -268,7 +268,7 @@ __initdb()
#endif
return(1);
}
if (!warned)
if (!warned++)
syslog(LOG_ERR, "%s: %m", p);
return(0);
}