From 2ca5abbc2b1d1c29ec47bd317244603db16f6bf3 Mon Sep 17 00:00:00 2001 From: Benjamin Riefenstahl Date: Sat, 11 Jun 2022 12:34:31 +0000 Subject: [PATCH] ape/bsd/bind.c: Do not pretend that the port could be negative. Ports are filtered through "htons" which returns an "unsigned short". --- sys/src/ape/lib/bsd/bind.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/src/ape/lib/bsd/bind.c b/sys/src/ape/lib/bsd/bind.c index f48ecf69f..aa4762c0b 100644 --- a/sys/src/ape/lib/bsd/bind.c +++ b/sys/src/ape/lib/bsd/bind.c @@ -68,7 +68,7 @@ bind(int fd, void *a, int alen) close(cfd); - if(_sock_inport(&r->addr) <= 0) + if(_sock_inport(&r->addr) == 0) _sock_ingetaddr(r, &r->addr, 0, "local"); return 0;