Commit f072ef3b authored by Vladimír Čunát's avatar Vladimír Čunát

daemon: nitpicks about the parent commit

parent 32f52fe4
......@@ -369,7 +369,7 @@ static int l_map(lua_State *L)
/* Read response */
uint32_t rlen = 0;
if (read(fd, &rlen, sizeof(rlen)) == sizeof(rlen)) {
expr_checked(rlen < UINT_MAX);
expr_checked(rlen < UINT32_MAX);
auto_free char *rbuf = malloc(rlen + 1);
expr_checked(rbuf != NULL);
expr_checked(read(fd, rbuf, rlen) == rlen);
......
......@@ -143,7 +143,7 @@ static int open_endpoint(struct network *net, struct endpoint *ep, struct sockad
return kr_error(ENOMEM);
}
memset(ep->udp, 0, sizeof(*ep->udp));
handle_init(udp, net->loop, ep->udp, sa->sa_family);
handle_init(udp, net->loop, ep->udp, sa->sa_family); /* can return! */
ret = udp_bind(ep->udp, sa);
if (ret != 0) {
return ret;
......@@ -156,7 +156,7 @@ static int open_endpoint(struct network *net, struct endpoint *ep, struct sockad
return kr_error(ENOMEM);
}
memset(ep->tcp, 0, sizeof(*ep->tcp));
handle_init(tcp, net->loop, ep->tcp, sa->sa_family);
handle_init(tcp, net->loop, ep->tcp, sa->sa_family); /* can return! */
if (flags & NET_TLS) {
ret = tcp_bind_tls(ep->tcp, sa);
ep->flags |= NET_TLS;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment