mirror of https://github.com/mkerrisk/man-pages
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:
parent
b7670bdd0d
commit
3e35b19b10
|
@ -593,7 +593,7 @@ if (addrp == NULL)
|
||||||
/* Handle error */ ;
|
/* Handle error */ ;
|
||||||
memset(addrp, 0, addrlen + 1);
|
memset(addrp, 0, addrlen + 1);
|
||||||
|
|
||||||
if (getsockname(sfd, (struct sockaddr *) addrp, &addrlen)) != \-1)
|
if (getsockname(sfd, (struct sockaddr *) addrp, &addrlen)) == \-1)
|
||||||
/* handle error */ ;
|
/* handle error */ ;
|
||||||
|
|
||||||
printf("sun_path = %s\\n", ((struct sockaddr_un *) addrp)\->sun_path);
|
printf("sun_path = %s\\n", ((struct sockaddr_un *) addrp)\->sun_path);
|
||||||
|
|
Loading…
Reference in New Issue