Commit 74fdc778 authored by Jan Včelák's avatar Jan Včelák 🚀

coverity: prevent false positive detection

CID #1268505
parent 7d9b10d9
......@@ -206,7 +206,7 @@ static int tcp_event_accept(tcp_context_t *tcp, unsigned i)
/* Accept client. */
int fd = tcp->set.pfd[i].fd;
int client = tcp_accept(fd);
if (client > 0) {
if (client >= 0) {
/* Assign to fdset. */
int next_id = fdset_add(&tcp->set, client, POLLIN, NULL);
if (next_id < 0) {
......
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