mirror of
https://github.com/samba-team/samba.git
synced 2025-03-08 04:58:40 +03:00
move vsyslog() from snprintf.c to replace.c
tx Elrond for prosecuting cleanness :)
This commit is contained in:
parent
b41cefb4c0
commit
2f30c2edfd
@ -414,3 +414,17 @@ char *rep_inet_ntoa(struct in_addr ip)
|
||||
return setvbuf(stream, (char *)NULL, _IOLBF, 0);
|
||||
}
|
||||
#endif /* HAVE_SETLINEBUF */
|
||||
|
||||
#ifndef HAVE_VSYSLOG
|
||||
#ifdef HAVE_SYSLOG
|
||||
void vsyslog (int facility_priority, char *format, va_list arglist)
|
||||
{
|
||||
char *msg = NULL;
|
||||
vasprintf(&msg, format, arglist);
|
||||
if (!msg)
|
||||
return;
|
||||
syslog(facility_priority, "%s", msg);
|
||||
SAFE_FREE(msg);
|
||||
}
|
||||
#endif /* HAVE_SYSLOG */
|
||||
#endif /* HAVE_VSYSLOG */
|
||||
|
@ -821,20 +821,6 @@ static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_VSYSLOG
|
||||
#ifdef HAVE_SYSLOG
|
||||
void vsyslog (int facility_priority, char *format, va_list arglist)
|
||||
{
|
||||
char *msg = NULL;
|
||||
vasprintf(&msg, format, arglist);
|
||||
if (!msg)
|
||||
return;
|
||||
syslog(facility_priority, "%s", msg);
|
||||
SAFE_FREE(msg);
|
||||
}
|
||||
#endif /* HAVE_SYSLOG */
|
||||
#endif /* HAVE_VSYSLOG */
|
||||
|
||||
#ifdef TEST_SNPRINTF
|
||||
|
||||
int sprintf(char *str,const char *fmt,...);
|
||||
|
Loading…
x
Reference in New Issue
Block a user