[SCM] Samba Shared Repository - branch master updated -
3c6d070595dee97151afa6eba6cef3ebe6ee3cfb
Volker Lendecke
vlendec at samba.org
Fri Dec 19 12:41:05 GMT 2008
The branch, master has been updated
via 3c6d070595dee97151afa6eba6cef3ebe6ee3cfb (commit)
from 42e407b300a5c6d90eeccb13d443229e057e455b (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 3c6d070595dee97151afa6eba6cef3ebe6ee3cfb
Author: Volker Lendecke <vl at samba.org>
Date: Sun Dec 14 13:18:22 2008 +0100
Move some bytes from data to text, make use of the ARRAY_SIZE macro
Probably pointless, but it doesn't add complexity and it is fun to see bss and
data shrink :-)
-----------------------------------------------------------------------
Summary of changes:
source3/lib/debug.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/lib/debug.c b/source3/lib/debug.c
index 193e9ef..14aca3a 100644
--- a/source3/lib/debug.c
+++ b/source3/lib/debug.c
@@ -832,7 +832,7 @@ void check_log_size( void )
/* map debug levels to syslog() priorities
* note that not all DEBUG(0, ...) calls are
* necessarily errors */
- static int priority_map[] = {
+ static const int priority_map[4] = {
LOG_ERR, /* 0 */
LOG_WARNING, /* 1 */
LOG_NOTICE, /* 2 */
@@ -842,7 +842,7 @@ void check_log_size( void )
char *msgbuf = NULL;
int ret;
- if( syslog_level >= ( sizeof(priority_map) / sizeof(priority_map[0]) ) || syslog_level < 0)
+ if( syslog_level >= ARRAY_SIZE(priority_map) || syslog_level < 0)
priority = LOG_DEBUG;
else
priority = priority_map[syslog_level];
--
Samba Shared Repository
More information about the samba-cvs
mailing list