[PATCH 6/6] debug: remove unused sys_adminlog

David Disseldorp ddiss at samba.org
Tue Nov 19 16:48:54 MST 2013


printing.c was the last user of this syslog wrapper.

Signed-off-by: David Disseldorp <ddiss at samba.org>
---
 source3/include/includes.h |  3 ---
 source3/lib/system.c       | 25 -------------------------
 2 files changed, 28 deletions(-)

diff --git a/source3/include/includes.h b/source3/include/includes.h
index 1b22a57..d18496a 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -457,9 +457,6 @@ int d_printf(const char *, ...) PRINTF_ATTRIBUTE(1,2);
 int d_fprintf(FILE *f, const char *, ...) PRINTF_ATTRIBUTE(2,3);
 
 /* PRINTFLIKE2 */
-void sys_adminlog(int priority, const char *format_str, ...) PRINTF_ATTRIBUTE(2,3);
-
-/* PRINTFLIKE2 */
 int fstr_sprintf(fstring s, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
 
 int smb_xvasprintf(char **ptr, const char *format, va_list ap) PRINTF_ATTRIBUTE(2,0);
diff --git a/source3/lib/system.c b/source3/lib/system.c
index 8252e4f..f251290 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -1305,31 +1305,6 @@ int sys_pclose(int fd)
 	return wstatus;
 }
 
-/**************************************************************************
- Wrapper for Admin Logs.
-****************************************************************************/
-
- void sys_adminlog(int priority, const char *format_str, ...) 
-{
-	va_list ap;
-	int ret;
-	char *msgbuf = NULL;
-
-	va_start( ap, format_str );
-	ret = vasprintf( &msgbuf, format_str, ap );
-	va_end( ap );
-
-	if (ret == -1)
-		return;
-
-#if defined(HAVE_SYSLOG)
-	syslog( priority, "%s", msgbuf );
-#else
-	DEBUG(0,("%s", msgbuf ));
-#endif
-	SAFE_FREE(msgbuf);
-}
-
 /****************************************************************************
  Return the major devicenumber for UNIX extensions.
 ****************************************************************************/
-- 
1.8.1.4



More information about the samba-technical mailing list