diff options
author | Ian Moffett <ian@osmora.org> | 2024-09-26 14:53:11 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-09-26 14:53:11 -0400 |
commit | 3ddd54639412c36cd0f88a9166c74ce2b6c68ca2 (patch) | |
tree | 0a0efc5f64f449fccc4d6633e13632b6535c7280 | |
parent | 8f3259254cbb51629671e67dd2345c7e23d4823f (diff) |
net: listen: Fix typo
Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r-- | ostp.d/net/otd_listen.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ostp.d/net/otd_listen.c b/ostp.d/net/otd_listen.c index 3abcf24..216db33 100644 --- a/ostp.d/net/otd_listen.c +++ b/ostp.d/net/otd_listen.c @@ -186,13 +186,13 @@ net_listen(void) saddr.sin_addr.s_addr = INADDR_ANY; saddr.sin_port = htons(LISTEN_PORT); error = bind(serv_sock, (struct sockaddr *)&saddr, sizeof(saddr)); - if (error < -1) { + if (error < 0) { perror("Failed to bind socket\n"); close(serv_sock); return error; } - if ((error = listen(serv_sock, MAX_BACKLOG)) < -1) { + if ((error = listen(serv_sock, MAX_BACKLOG)) < 0) { perror("Failed to listen"); return error; } |