select_tut.2: tfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2016-02-03 15:51:00 +01:00
parent 65842010f3
commit 5dbb60df52
1 changed files with 1 additions and 1 deletions

View File

@ -708,7 +708,7 @@ main(int argc, char *argv[])
struct sockaddr_in client_addr;
int fd;
addrelen = sizeof(client_addr);
addrlen = sizeof(client_addr);
memset(&client_addr, 0, addrlen);
fd = accept(h, (struct sockaddr *) &client_addr, &addrlen);
if (fd == \-1) {