aboutsummaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2018-04-24 16:39:35 -0700
committerGarrett D'Amore <garrett@damore.org>2018-04-24 16:39:35 -0700
commitd35973833e6bf05fec29100a4d5e66bb07b06659 (patch)
treeb380e99a092a0229c8f087d231306b398f6f43f2 /src/transport
parent007f74b1053c9406340ffa728f9c254ba37e2a6c (diff)
downloadnng-d35973833e6bf05fec29100a4d5e66bb07b06659.tar.gz
nng-d35973833e6bf05fec29100a4d5e66bb07b06659.tar.bz2
nng-d35973833e6bf05fec29100a4d5e66bb07b06659.zip
fix a number of cppcheck complaints (not all)
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/ws/websocket.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/transport/ws/websocket.c b/src/transport/ws/websocket.c
index 761ba824..9d967668 100644
--- a/src/transport/ws/websocket.c
+++ b/src/transport/ws/websocket.c
@@ -308,16 +308,15 @@ ws_ep_accept(void *arg, nni_aio *aio)
static void
ws_ep_connect(void *arg, nni_aio *aio)
{
- ws_ep * ep = arg;
- int rv = 0;
- ws_hdr *h;
+ ws_ep *ep = arg;
if (nni_aio_begin(aio) != 0) {
return;
}
if (!ep->started) {
+ ws_hdr *h;
NNI_LIST_FOREACH (&ep->headers, h) {
- rv = nni_ws_dialer_header(
+ int rv = nni_ws_dialer_header(
ep->dialer, h->name, h->value);
if (rv != 0) {
nni_aio_finish_error(aio, rv);