aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest/lib1900.c
diff options
context:
space:
mode:
authorMarian Klymov <nekto1989@gmail.com>2018-06-02 23:52:56 +0300
committerDaniel Stenberg <daniel@haxx.se>2018-06-11 11:14:48 +0200
commitc45360d4633850839bb9c2d77dbf8a8285e9ad49 (patch)
tree20159c553a74ed98c2431fc8f2852067f79ac4e9 /tests/libtest/lib1900.c
parent38203f1585da53e07e54e37c7d5da4d72f509a2e (diff)
cppcheck: fix warnings
- Get rid of variable that was generating false positive warning (unitialized) - Fix issues in tests - Reduce scope of several variables all over etc Closes #2631
Diffstat (limited to 'tests/libtest/lib1900.c')
-rw-r--r--tests/libtest/lib1900.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/libtest/lib1900.c b/tests/libtest/lib1900.c
index 109c57062..cf55fb332 100644
--- a/tests/libtest/lib1900.c
+++ b/tests/libtest/lib1900.c
@@ -63,14 +63,14 @@ static int parse_url_file(const char *filename)
return 0;
while(!feof(f)) {
- if(fscanf(f, "%d %s\n", &filetime, buf)) {
+ if(fscanf(f, "%d %199s\n", &filetime, buf)) {
urltime[num_handles] = filetime;
urlstring[num_handles] = strdup(buf);
num_handles++;
continue;
}
- if(fscanf(f, "blacklist_site %s\n", buf)) {
+ if(fscanf(f, "blacklist_site %199s\n", buf)) {
site_blacklist[blacklist_num_sites] = strdup(buf);
blacklist_num_sites++;
continue;
@@ -192,11 +192,11 @@ int test(char *URL)
do {
msg = curl_multi_info_read(m, &msgs_left);
if(msg && msg->msg == CURLMSG_DONE) {
- int i, found = 0;
+ int i;
/* Find out which handle this message is about */
for(i = 0; i < num_handles; i++) {
- found = (msg->easy_handle == handles[i]);
+ int found = (msg->easy_handle == handles[i]);
if(found)
break;
}