]> granicus.if.org Git - curl/commitdiff
corrected dubious use of the same variable twice in a function call,
authorDaniel Stenberg <daniel@haxx.se>
Tue, 14 Aug 2001 06:06:15 +0000 (06:06 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 14 Aug 2001 06:06:15 +0000 (06:06 +0000)
gcc 3.0 warned about it

lib/mprintf.c

index 1bf9a6e723d35011796f4759d96fabfd93ad9a73..9d446070c6d3e26b678063d56590fa1ed8d306f5 100644 (file)
@@ -446,7 +446,7 @@ static int dprintf_Pass1(char *format, va_stack_t *vto, char **endpos, va_list a
        case '1': case '2': case '3': case '4':
        case '5': case '6': case '7': case '8': case '9':
          flags |= FLAGS_WIDTH;
-         width = strtol(--fmt, &fmt, 10);
+         width = strtol(fmt-1, &fmt, 10);
          break;
        case '*':  /* Special case */
          flags |= FLAGS_WIDTHPARAM;