Skip to content

Commit ec914f2

Browse files
committed
Variable initialization and apparent copy/paste error removed.
1 parent 83cac3d commit ec914f2

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

http.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ int dill_http_done(int s, int64_t deadline) {
109109
}
110110

111111
int dill_http_detach(int s, int64_t deadline) {
112-
int err;
112+
int err = 0;
113113
struct dill_http_sock *obj = dill_hquery(s, dill_http_type);
114114
if(dill_slow(!obj)) return -1;
115115
int u = dill_term_detach(obj->u, deadline);

iol.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ int dill_iolcheck(struct iolist *first, struct iolist *last,
3636
}
3737
if(dill_slow(!first || !last || last->iol_next)) {
3838
errno = EINVAL; return -1;}
39-
size_t nbf = 0, nbt = 0, res = 0;
39+
size_t nbf = 0, nbt = 0;
4040
struct iolist *it;
4141
for(it = first; it; it = it->iol_next) {
4242
if(dill_slow(it->iol_rsvd || (!it->iol_next && it != last)))

prefix.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ int dill_prefix_attach_mem(int s, size_t hdrlen, int flags,
8686
self->mem = 1;
8787
/* Create the handle. */
8888
int h = dill_hmake(&self->hvfs);
89-
if(dill_slow(h < 0)) {int err = errno; goto error;}
89+
if(dill_slow(h < 0)) {err = errno; goto error;}
9090
return h;
9191
error:
9292
if(s >= 0) dill_hclose(s);

socks5.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ int dill_socks5_proxy_recvcommand(int s, struct dill_ipaddr *ipaddr,
436436
}
437437
_socks5_addr s5addr;
438438
s5addr.atyp = conn[3];
439-
uint16_t *port;
439+
uint16_t *port = NULL;
440440
switch(s5addr.atyp) {
441441
case S5ADDR_IPV4:
442442
memcpy((void *)&(s5addr.addr), (void *)&(conn[4]), S5ADDR_IPV4_SZ);
@@ -473,7 +473,7 @@ int dill_socks5_proxy_recvcommandbyname(int s, char *host, int *port,
473473
if((conn[1] < DILL_SOCKS5_CONNECT) || (conn[1] > DILL_SOCKS5_UDP_ASSOCIATE)) {
474474
errno = EPROTO ; return -1;
475475
}
476-
uint16_t *s5port;
476+
uint16_t *s5port = NULL;
477477
switch(conn[3]) {
478478
case S5ADDR_IPV4:
479479
inet_ntop(AF_INET, (void *)&(conn[4]), host, 256);

term.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ int dill_term_attach_mem(int s, const void *buf, size_t len,
9191
self->mem = 1;
9292
/* Create the handle. */
9393
int h = dill_hmake(&self->hvfs);
94-
if(dill_slow(h < 0)) {int err = errno; goto error;}
94+
if(dill_slow(h < 0)) {err = errno; goto error;}
9595
return h;
9696
error:
9797
if(s >= 0) dill_hclose(s);

tls.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ int dill_tls_attach_client_mem(int s, struct dill_tls_storage *mem,
121121
}
122122
/* Create the handle. */
123123
int h = dill_hmake(&self->hvfs);
124-
if(dill_slow(h < 0)) {int err = errno; goto error4;}
124+
if(dill_slow(h < 0)) {err = errno; goto error4;}
125125
return h;
126126
error4:
127127
BIO_vfree(bio);
@@ -207,7 +207,7 @@ int dill_tls_attach_server_mem(int s, const char *cert, const char *pkey,
207207
}
208208
/* Create the handle. */
209209
int h = dill_hmake(&self->hvfs);
210-
if(dill_slow(h < 0)) {int err = errno; goto error4;}
210+
if(dill_slow(h < 0)) {err = errno; goto error4;}
211211
return h;
212212
error4:
213213
BIO_vfree(bio);

0 commit comments

Comments
 (0)