unix.7: Fix buglet in code snippet in BUGS section

Reported-by: Scott Harvey <scott.harvey@stonybrook.edu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2014-11-09 21:15:56 +01:00
parent b7670bdd0d
commit 3e35b19b10
1 changed files with 1 additions and 1 deletions

View File

@ -593,7 +593,7 @@ if (addrp == NULL)
/* Handle error */ ;
memset(addrp, 0, addrlen + 1);
if (getsockname(sfd, (struct sockaddr *) addrp, &addrlen)) != \-1)
if (getsockname(sfd, (struct sockaddr *) addrp, &addrlen)) == \-1)
/* handle error */ ;
printf("sun_path = %s\\n", ((struct sockaddr_un *) addrp)\->sun_path);