]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
mprintf: drop old sprintf fallback
authorDaniel Stenberg <daniel@haxx.se>
Thu, 8 Jan 2026 08:10:38 +0000 (09:10 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 8 Jan 2026 08:31:39 +0000 (09:31 +0100)
1. No modern systems lack snprintf()

2. If there actually exist any such systems, they get to manage without
   floating point output.

Closes #20218

lib/mprintf.c

index 50ede212a41588e029651d8b15bff261cc2ea4c5..85aedf4992f04c1af45fd99ac7feabd942e0050e 100644 (file)
@@ -712,7 +712,8 @@ static bool out_double(void *userp,
   work[BUFFSIZE - 1] = 0;
 #endif
 #else
-  (sprintf)(work, formatbuf, dnum);
+  /* float and double outputs do not work without snprintf support */
+  work[0] = 0;
 #endif
 #ifdef __clang__
 #pragma clang diagnostic pop