aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest/lib1541.c
diff options
context:
space:
mode:
authorMarcel Raad <Marcel.Raad@teamviewer.com>2019-05-25 10:06:08 +0200
committerMarcel Raad <Marcel.Raad@teamviewer.com>2019-06-05 20:38:06 +0200
commite23c52b3295a525fbaae9e7ed3e7061fea6dffc2 (patch)
tree4a74cf5ed3496a6126f1cc7c4284b6620108db06 /tests/libtest/lib1541.c
parent04ac54e1965041684fc1b6532eba90f58601264e (diff)
build: fix Codacy warnings
Reduce variable scopes and remove redundant variable stores. Closes https://github.com/curl/curl/pull/3975
Diffstat (limited to 'tests/libtest/lib1541.c')
-rw-r--r--tests/libtest/lib1541.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/libtest/lib1541.c b/tests/libtest/lib1541.c
index 983a47e01..f3b41f5be 100644
--- a/tests/libtest/lib1541.c
+++ b/tests/libtest/lib1541.c
@@ -104,7 +104,6 @@ int test(char *URL)
{
pthread_t tid[NUM_THREADS];
int i;
- int error;
CURLSH *share;
struct initurl url[NUM_THREADS];
@@ -119,6 +118,7 @@ int test(char *URL)
init_locks();
for(i = 0; i< NUM_THREADS; i++) {
+ int error;
url[i].url = URL;
url[i].share = share;
url[i].threadno = i;
@@ -131,7 +131,7 @@ int test(char *URL)
/* now wait for all threads to terminate */
for(i = 0; i< NUM_THREADS; i++) {
- error = pthread_join(tid[i], NULL);
+ pthread_join(tid[i], NULL);
fprintf(stderr, "Thread %d terminated\n", i);
}