From: Christos Zoulas Date: Mon, 17 Oct 2005 19:03:34 +0000 (+0000) Subject: add return values. X-Git-Tag: FILE5_05~789 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0627f94cbab045772739def2a247f92ed8de9b96;p=file add return values. --- diff --git a/src/funcs.c b/src/funcs.c index c4f8aa45..4084d743 100644 --- a/src/funcs.c +++ b/src/funcs.c @@ -32,7 +32,7 @@ #include #ifndef lint -FILE_RCSID("@(#)$Id: funcs.c,v 1.16 2005/10/17 18:41:44 christos Exp $") +FILE_RCSID("@(#)$Id: funcs.c,v 1.17 2005/10/17 19:03:34 christos Exp $") #endif /* lint */ #ifndef HAVE_VSNPRINTF @@ -196,7 +196,7 @@ file_getbuffer(struct magic_set *ms) int vsnprintf(char *buf, size_t len, const char *fmt, va_list ap) { - vsprintf(buf, fmt, ap); + return vsprintf(buf, fmt, ap); } #endif @@ -205,9 +205,11 @@ vsnprintf(char *buf, size_t len, const char *fmt, va_list ap) int snprintf(char *buf, size_t len, const char *fmt, ...) { + int rv; va_list ap; va_start(ap, fmt); - vsprintf(buf, fmt, ap); + rv = vsprintf(buf, fmt, ap); va_end(ap); + return rv; } #endif