]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
use %ld when printf()ing long variables (and removed use of 'register')
authorDaniel Stenberg <daniel@haxx.se>
Thu, 26 Feb 2004 12:32:29 +0000 (12:32 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 26 Feb 2004 12:32:29 +0000 (12:32 +0000)
lib/mprintf.c

index d56ef0301b9d76f718c835fc20f88338c962560b..8956cb6ca92c41033072f028b884535a20e5b128 100644 (file)
@@ -611,7 +611,8 @@ static int dprintf_formatf(
     char alt;
     
     /* Width of a field.  */
-    register long width;
+    long width;
+
     /* Precision of a field.  */
     long prec;
     
@@ -913,11 +914,11 @@ static int dprintf_formatf(
 
        if(width >= 0) {
          /* RECURSIVE USAGE */
-         fptr += curl_msprintf(fptr, "%d", width);
+         fptr += curl_msprintf(fptr, "%ld", width);
        }
        if(prec >= 0) {
          /* RECURSIVE USAGE */
-         fptr += curl_msprintf(fptr, ".%d", prec);
+         fptr += curl_msprintf(fptr, ".%ld", prec);
        }
        if (p->flags & FLAGS_LONG)
          strcat(fptr, "l");