]> git.ozlabs.org Git - petitboot/blobdiff - discover/discover-server.c
discover: Fix accept() return value check
[petitboot] / discover / discover-server.c
index 138551ab2ddfa841a6e1533a884ee69541c02b30..2509457376e021d6bbdc20501d4bf358a5195fb8 100644 (file)
@@ -208,7 +208,7 @@ static int discover_server_process_connection(void *arg)
 
        /* accept the incoming connection */
        fd = accept(server->socket, NULL, 0);
-       if (!fd) {
+       if (fd < 0) {
                pb_log("accept: %s\n", strerror(errno));
                return 0;
        }