From 0cc7ccdefa6f1fd3f8e23254c34f956156136a39 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sun, 27 Aug 2023 22:58:39 +0000 Subject: cleanup git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4619 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- editor/specialty/pnmindex.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'editor') diff --git a/editor/specialty/pnmindex.c b/editor/specialty/pnmindex.c index 2b39e4ec..dcb183ef 100644 --- a/editor/specialty/pnmindex.c +++ b/editor/specialty/pnmindex.c @@ -15,12 +15,14 @@ ============================================================================*/ #define _DEFAULT_SOURCE /* New name for SVID & BSD source defines */ +#define _C99_SOURCE /* Make sure snprintf() is in stdio.h */ #define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ #define _BSD_SOURCE /* Make sure strdup is in string.h */ #include #include #include +#include #include #include @@ -61,7 +63,7 @@ systemf(const char * const fmt, va_start(varargs, fmt); - pm_vsnprintf(NULL, 0, fmt, varargs, &dryRunLen); + dryRunLen = vsnprintf(NULL, 0, fmt, varargs); va_end(varargs); @@ -82,7 +84,7 @@ systemf(const char * const fmt, va_start(varargs, fmt); - pm_vsnprintf(shellCommand, allocSize, fmt, varargs, &realLen); + realLen = vsnprintf(shellCommand, allocSize, fmt, varargs); assert(realLen == dryRunLen); va_end(varargs); -- cgit 1.4.1