From: Nathan Bryant Date: Thu, 5 Nov 1998 08:23:45 +0000 (+0000) Subject: * snprintf.c: warning fix propagated over from gcit X-Git-Tag: v7.86~8186 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=d6426446376f90e296b1e076327042526283cf89;p=citadel.git * snprintf.c: warning fix propagated over from gcit --- diff --git a/citadel/ChangeLog b/citadel/ChangeLog index cf8f50143..9890c4fa4 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -1,3 +1,6 @@ +1998-11-05 Nathan Bryant + * snprintf.c: warning fix propagated over from gcit + 1998-11-04 Nathan Bryant * added RCS Id keyword strings to sources * citmail.c: reverted to version 1.10 diff --git a/citadel/snprintf.c b/citadel/snprintf.c index d4c39ba2f..89d650d7d 100644 --- a/citadel/snprintf.c +++ b/citadel/snprintf.c @@ -48,19 +48,6 @@ needed (const char *fmt, va_list argp) return vfprintf(sink, fmt, argp); } -int -snprintf (char *buf, size_t max, const char *fmt, ...) -{ - va_list argp; - int bytes; - - va_start(argp, fmt); - bytes = vsnprintf(buf, max, fmt, argp); - va_end(argp); - - return bytes; -} - int vsnprintf (char *buf, size_t max, const char *fmt, va_list argp) { @@ -81,3 +68,16 @@ vsnprintf (char *buf, size_t max, const char *fmt, va_list argp) free(p); return size; } + +int +snprintf (char *buf, size_t max, const char *fmt, ...) +{ + va_list argp; + int bytes; + + va_start(argp, fmt); + bytes = vsnprintf(buf, max, fmt, argp); + va_end(argp); + + return bytes; +}