]> granicus.if.org Git - curl/commitdiff
chkspeed: bad strtol() call for -M option
authorBrad Hards <bradh@frogmouth.net>
Thu, 16 Dec 2010 23:06:03 +0000 (00:06 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 16 Dec 2010 23:09:48 +0000 (00:09 +0100)
Bug: http://curl.haxx.se/mail/lib-2010-12/0192.html

docs/examples/chkspeed.c

index 00db5bf1d4bfd61eeea7b01ba35dc8b18787c623..4305bde8df361902aa32fee39741acb733484d4b 100644 (file)
@@ -71,7 +71,7 @@ int main(int argc, char *argv[])
         } else if (strncasecmp(*argv, "-T", 2) == 0) {
           prttime = 1;
         } else if (strncasecmp(*argv, "-M=", 3) == 0) {
-          long m = strtol(argv+3, NULL, 10);
+          long m = strtol((*argv)+3, NULL, 10);
           switch(m) {
             case   1: url = URL_1M;
                       break;