diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-12-13 04:00:52 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-12-13 04:00:52 +0100 |
commit | 1eac4f3880f10a4a9702939b60d322b40db08972 (patch) | |
tree | 27ae85f869fb3b1d5744f5207e4c4bf9c941f93d /libc/misc/locale/freelocale.c | |
parent | a92f0c261364774d4f844300dd2c3b11e9deaf02 (diff) |
syslog: fix openlog(xx, LOG_KERN) and optimize a bit
The fix:
logfac == 0 in openlog(xx, logfac) is allowed now.
Corresponding internal openlog() call in vsyslog()
uses explicit LOG_USER in order to set it as a default
facility.
Optimizations:
mylock is not recursive now, since a single intenal call
of openlog is converted to a call to openlog_internal
which assumes that lock is already taken. No recursive
locking is possible now.
LogFacility is reduced to byte.
cache static LogFile in auto variable fd (smaller code).
vsyslog with bogus pri parameter wouldn't lock/unlock
and mess with signals - it will just return at once.
pass NULL as ident string in internal openlog call
- same effect as passing LogTag but smaller code.
comment out "if (LogTag)" checks - it is never NULL.
use the same struct sigaction for setting new sigaction
and for saving old one - saves ~32 bytes of stack.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libc/misc/locale/freelocale.c')
0 files changed, 0 insertions, 0 deletions