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:
W. Trevor King 2016-05-12 01:24:26 -07:00 committed by Michael Kerrisk
parent dad5081f4a
commit 3cb43b9579
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}