summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGisle Vanem <gvanem@broadpark.no>2008-11-03 15:51:40 +0000
committerGisle Vanem <gvanem@broadpark.no>2008-11-03 15:51:40 +0000
commitefe2ce3647b751d137c105c3b08b8290fb1f801c (patch)
tree612fc934d61c8828b37584332c47ac54186efd74
parent71f00188fb83592271883b94660da4e75ef20818 (diff)
downloadgnurl-efe2ce3647b751d137c105c3b08b8290fb1f801c.tar.gz
gnurl-efe2ce3647b751d137c105c3b08b8290fb1f801c.tar.bz2
gnurl-efe2ce3647b751d137c105c3b08b8290fb1f801c.zip
If building with CURLDEBUG, sprintf() is defined away. So use curl_msprintf()
and not sprintf().
-rw-r--r--src/writeenv.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/writeenv.c b/src/writeenv.c
index 9789e2aeb..b432de69e 100644
--- a/src/writeenv.c
+++ b/src/writeenv.c
@@ -1,8 +1,8 @@
/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
@@ -10,7 +10,7 @@
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at http://curl.haxx.se/docs/copyright.html.
- *
+ *
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the COPYING file.
@@ -82,7 +82,7 @@ void ourWriteEnv(CURL *curl)
char *string, numtext[10];
long longinfo;
double doubleinfo;
-
+
for (i=0; variables[i].name; i++) {
switch (variables[i].type) {
case writeenv_STRING:
@@ -94,7 +94,7 @@ void ourWriteEnv(CURL *curl)
case writeenv_LONG:
if (curl_easy_getinfo(curl, variables[i].id, &longinfo) == CURLE_OK) {
- sprintf(numtext, "%5ld", longinfo);
+ curl_msprintf(numtext, "%5ld", longinfo);
internalSetEnv(variables[i].name, numtext);
}
else
@@ -102,7 +102,7 @@ void ourWriteEnv(CURL *curl)
break;
case writeenv_DOUBLE:
if (curl_easy_getinfo(curl, variables[i].id, &doubleinfo) == CURLE_OK) {
- sprintf(numtext, "%6.2f", doubleinfo);
+ curl_msprintf(numtext, "%6.2f", doubleinfo);
internalSetEnv(variables[i].name, numtext);
}
else