diff options
author | EKR <ekr@rtfm.com> | 2016-03-13 16:58:32 +0100 |
---|---|---|
committer | EKR <ekr@rtfm.com> | 2016-03-13 16:58:32 +0100 |
commit | 998822c731cc6f7dbfb0bd50acefe6dcd92a60df (patch) | |
tree | eee0954fa21ba9501194aed6f3d87c52823f3fd9 /cmd/strsclnt | |
parent | b888fe4827c2837666b54e5a4252ce83ae85ec47 (diff) | |
download | nss-hg-998822c731cc6f7dbfb0bd50acefe6dcd92a60df.tar.gz |
Bug 1256630 - Fix scan-build errors. r=mt
Diffstat (limited to 'cmd/strsclnt')
-rw-r--r-- | cmd/strsclnt/strsclnt.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/cmd/strsclnt/strsclnt.c b/cmd/strsclnt/strsclnt.c index c4d66c507..4a45951ba 100644 --- a/cmd/strsclnt/strsclnt.c +++ b/cmd/strsclnt/strsclnt.c @@ -327,7 +327,7 @@ printSecurityInfo(PRFileDesc *fd) #define MAX_THREADS 128 -typedef int startFn(void *a, void *b, int c); +typedef SECStatus startFn(void *a, void *b, int c); static PRInt32 numConnected; @@ -547,7 +547,7 @@ lockedVars_AddToCount(lockedVars * lv, int addend) return rv; } -int +SECStatus do_writes( void * a, void * b, @@ -708,7 +708,7 @@ myHandshakeCallback(PRFileDesc *socket, void *arg) /* one copy of this function is launched in a separate thread for each ** connection to be made. */ -int +SECStatus do_connects( void * a, void * b, @@ -720,7 +720,7 @@ do_connects( PRFileDesc * tcp_sock = 0; PRStatus prStatus; PRUint32 sleepInterval = 50; /* milliseconds */ - int rv = SECSuccess; + SECStatus rv = SECSuccess; PRSocketOptionData opt; retry: @@ -784,7 +784,6 @@ retry: goto retry; } errWarn("PR_Connect"); - rv = SECFailure; goto done; } else { if (ThrottleUp) { @@ -855,7 +854,7 @@ done: } else if (tcp_sock) { PR_Close(tcp_sock); } - return SECSuccess; + return rv; } @@ -1239,7 +1238,7 @@ client_main( if (!NoReuse) { remaining_connections = 1; - rv = launch_thread(do_connects, &addr, model_sock, 0); + launch_thread(do_connects, &addr, model_sock, 0); /* wait for the first connection to terminate, then launch the rest. */ reap_threads(); remaining_connections = total_connections - 1 ; @@ -1248,7 +1247,7 @@ client_main( active_threads = PR_MIN(active_threads, remaining_connections); /* Start up the threads */ for (i=0;i<active_threads;i++) { - rv = launch_thread(do_connects, &addr, model_sock, i); + launch_thread(do_connects, &addr, model_sock, i); } reap_threads(); } |