svn commit: samba r18998 - in
branches/SAMBA_3_0/source/lib/replace: .
metze at samba.org
metze at samba.org
Fri Sep 29 12:30:15 GMT 2006
Author: metze
Date: 2006-09-29 12:30:14 +0000 (Fri, 29 Sep 2006)
New Revision: 18998
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18998
Log:
- make more usage of PRINTF_ATTRIBUTE()
- vsyslog takes a 'const char *format'
metze
Modified:
branches/SAMBA_3_0/source/lib/replace/replace.c
branches/SAMBA_3_0/source/lib/replace/replace.h
Changeset:
Modified: branches/SAMBA_3_0/source/lib/replace/replace.c
===================================================================
--- branches/SAMBA_3_0/source/lib/replace/replace.c 2006-09-29 12:24:23 UTC (rev 18997)
+++ branches/SAMBA_3_0/source/lib/replace/replace.c 2006-09-29 12:30:14 UTC (rev 18998)
@@ -346,7 +346,7 @@
#ifndef HAVE_VSYSLOG
#ifdef HAVE_SYSLOG
-void rep_vsyslog (int facility_priority, char *format, va_list arglist)
+void rep_vsyslog (int facility_priority, const char *format, va_list arglist)
{
char *msg = NULL;
vasprintf(&msg, format, arglist);
Modified: branches/SAMBA_3_0/source/lib/replace/replace.h
===================================================================
--- branches/SAMBA_3_0/source/lib/replace/replace.h 2006-09-29 12:24:23 UTC (rev 18997)
+++ branches/SAMBA_3_0/source/lib/replace/replace.h 2006-09-29 12:30:14 UTC (rev 18998)
@@ -151,13 +151,6 @@
void rep_setlinebuf(FILE *);
#endif
-#ifndef HAVE_VSYSLOG
-#ifdef HAVE_SYSLOG
-#define vsyslog rep_vsyslog
-void rep_vsyslog (int facility_priority, char *format, va_list arglist);
-#endif
-#endif
-
#ifndef HAVE_STRCASESTR
#define strcasestr rep_strcasestr
char *rep_strcasestr(const char *haystack, const char *needle);
@@ -227,7 +220,7 @@
#ifndef HAVE_VASPRINTF
#define vasprintf rep_vasprintf
-int rep_vasprintf(char **ptr, const char *format, va_list ap);
+int rep_vasprintf(char **ptr, const char *format, va_list ap) PRINTF_ATTRIBUTE(2,0);
#endif
#if !defined(HAVE_SNPRINTF) || !defined(HAVE_C99_VSNPRINTF)
@@ -237,7 +230,7 @@
#if !defined(HAVE_VSNPRINTF) || !defined(HAVE_C99_VSNPRINTF)
#define vsnprintf rep_vsnprintf
-int rep_vsnprintf(char *,size_t ,const char *, va_list ap);
+int rep_vsnprintf(char *,size_t ,const char *, va_list ap) PRINTF_ATTRIBUTE(3,0);
#endif
#ifndef HAVE_ASPRINTF
@@ -245,6 +238,12 @@
int rep_asprintf(char **,const char *, ...) PRINTF_ATTRIBUTE(2,3);
#endif
+#ifndef HAVE_VSYSLOG
+#ifdef HAVE_SYSLOG
+#define vsyslog rep_vsyslog
+void rep_vsyslog (int facility_priority, const char *format, va_list arglist) PRINTF_ATTRIBUTE(2,0);
+#endif
+#endif
/* we used to use these fns, but now we have good replacements
for snprintf and vsnprintf */
More information about the samba-cvs
mailing list