From f855d1a309f38301bcd8898e9fbc5c70133d1f98 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 13 May 1998 13:48:25 +0000 Subject: [PATCH] vsprintf returns char* on sunos4 --- io.c | 3 ++- log.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/io.c b/io.c index 587b3c74..004f4cee 100644 --- a/io.c +++ b/io.c @@ -472,7 +472,8 @@ void io_printf(int fd, const char *format, ...) #if HAVE_VSNPRINTF len = vsnprintf(buf, sizeof(buf)-1, format, ap); #else - len = vsprintf(buf, format, ap); + vsprintf(buf, format, ap); + len = strlen(buf); #endif va_end(ap); diff --git a/log.c b/log.c index 19339c76..068b5a93 100644 --- a/log.c +++ b/log.c @@ -37,7 +37,8 @@ void rprintf(int fd, const char *format, ...) #if HAVE_VSNPRINTF len = vsnprintf(buf, sizeof(buf)-1, format, ap); #else - len = vsprintf(buf, format, ap); + vsprintf(buf, format, ap); + len = strlen(buf); #endif va_end(ap); -- 2.34.1