about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2023-09-28 21:43:39 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2023-09-28 21:43:39 +0000
commitc8ea970312eb3e9877d876e5b4d5575237187197 (patch)
treea917cfba8b6f6ee518bfdc0e7b7b31d9a0504e36 /lib
parent4a429a65013f6ad85fae32a4d5288aee16b1863f (diff)
downloadnetpbm-mirror-c8ea970312eb3e9877d876e5b4d5575237187197.tar.gz
netpbm-mirror-c8ea970312eb3e9877d876e5b4d5575237187197.tar.xz
netpbm-mirror-c8ea970312eb3e9877d876e5b4d5575237187197.zip
Fix compile error -- wrong interface to snprintf -- on systems without asprintf
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4704 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'lib')
-rw-r--r--lib/util/nstring.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/util/nstring.c b/lib/util/nstring.c
index 623fd7b7..29da8fe5 100644
--- a/lib/util/nstring.c
+++ b/lib/util/nstring.c
@@ -84,7 +84,7 @@ pm_asprintf(const char ** const resultP,
 
     va_start(varargs, fmt);
 
-    vsnprintf(NULL, 0, fmt, varargs, &dryRunLen);
+    dryRunLen = vsnprintf(NULL, 0, fmt, varargs);
 
     va_end(varargs);
 
@@ -101,7 +101,7 @@ pm_asprintf(const char ** const resultP,
 
             va_start(varargs, fmt);
 
-            vsnprintf(buffer, allocSize, fmt, varargs, &realLen);
+            realLen = vsnprintf(buffer, allocSize, fmt, varargs);
 
             assert(realLen == dryRunLen);
             va_end(varargs);