ape/bsd/bind.c: Do not pretend that the port could be negative.

Ports are filtered through "htons" which returns an "unsigned short".
This commit is contained in:
Benjamin Riefenstahl 2022-06-11 12:34:31 +00:00 committed by Ori Bernstein
parent 25a0d57478
commit 2ca5abbc2b

View file

@ -68,7 +68,7 @@ bind(int fd, void *a, int alen)
close(cfd); close(cfd);
if(_sock_inport(&r->addr) <= 0) if(_sock_inport(&r->addr) == 0)
_sock_ingetaddr(r, &r->addr, 0, "local"); _sock_ingetaddr(r, &r->addr, 0, "local");
return 0; return 0;