Skip to content

Commit

Permalink
lib1900.c: Fixed cppcheck error
Browse files Browse the repository at this point in the history
lib1900.c:182: (style) Array index 'handlenum' is used before limits
               check

Bug: #133
  • Loading branch information
serval2412 authored and captain-caveman2k committed Dec 31, 2014
1 parent e86a615 commit ee0941a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/libtest/lib1900.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ee0941a

Please sign in to comment.