From ee0941a0b79d6ee96fd8db24af96118925fda18f Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Wed, 31 Dec 2014 13:25:09 +0100 Subject: lib1900.c: Fixed cppcheck error lib1900.c:182: (style) Array index 'handlenum' is used before limits check Bug: https://github.com/bagder/curl/pull/133 --- tests/libtest/lib1900.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/libtest') diff --git a/tests/libtest/lib1900.c b/tests/libtest/lib1900.c index fa83130b6..2f64742a1 100644 --- a/tests/libtest/lib1900.c +++ b/tests/libtest/lib1900.c @@ -179,7 +179,7 @@ int test(char *URL) now = tutil_tvnow(); msnow = now.tv_sec * 1000 + now.tv_usec / 1000; mslast = last_handle_add.tv_sec * 1000 + last_handle_add.tv_usec / 1000; - if(msnow - mslast >= urltime[handlenum] && handlenum < num_handles) { + if((msnow - mslast) >= urltime[handlenum]) { fprintf(stdout, "Adding handle %d\n", handlenum); setup_handle(URL, m, handlenum); last_handle_add = now; -- cgit v1.2.3