mirror of https://github.com/mkerrisk/man-pages
unix.7: Fix example code: 'ret' check after accept populates 'data_socket'
A typo from 15545eb6
(unix.7: Add example, 2016-01-06).
Signed-off-by: W. Trevor King <wking@tremily.us>
This commit is contained in:
parent
dad5081f4a
commit
3cb43b9579
|
@ -735,7 +735,7 @@ main(int argc, char *argv[])
|
|||
/* Wait for incoming connection. */
|
||||
|
||||
data_socket = accept(connection_socket, NULL, NULL);
|
||||
if (ret == \-1) {
|
||||
if (data_socket == \-1) {
|
||||
perror("accept");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue