code: plan9front

Download patch

ref: e01e80c5e7d4b619754686acec70c1fd24d5f623
parent: 2ca5abbc2b1d1c29ec47bd317244603db16f6bf3
author: Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net>
date: Tue Jul 5 23:38:17 EDT 2022

ape/bsd/listen.c: Drop "bind 0".

There does not seem to be a good reason for this.  The "bind" command
has no practical consequence.

--- a/sys/src/ape/lib/bsd/listen.c
+++ b/sys/src/ape/lib/bsd/listen.c
@@ -139,12 +139,6 @@
 			errno = EBADF;
 			return -1;
 		}
-		/* FIXME: What is this good for? */
-		if(write(cfd, "bind 0", 6) < 0) {
-			errno = EGREG;
-			close(cfd);
-			return -1;
-		}
 		strcpy(msg, "announce ");
 		_sock_inaddr2string(r, msg + 9, sizeof msg - 9);
 		n = write(cfd, msg, strlen(msg));