"%s", srv->port, strerror(errno));
goto fail;
}
- if (listen(srv->fd, 10 /* max backlog */) < 0)
- goto fail;
- if (fcntl(srv->fd, F_SETFL, O_NONBLOCK) < 0)
- goto fail;
- if (eloop_register_sock(srv->fd, EVENT_TYPE_READ, http_server_cb,
+ if (listen(srv->fd, 10 /* max backlog */) < 0 ||
+ fcntl(srv->fd, F_SETFL, O_NONBLOCK) < 0 ||
+ eloop_register_sock(srv->fd, EVENT_TYPE_READ, http_server_cb,
srv, NULL))
goto fail;