nc: use symbolic SHUT_WR instead of literal 1

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2013-07-28 21:08:37 +02:00
parent ad546ec606
commit ca54b662e7

View File

@ -261,7 +261,7 @@ int nc_main(int argc, char **argv)
if (nread < 1) { if (nread < 1) {
/* Close outgoing half-connection so they get EOF, /* Close outgoing half-connection so they get EOF,
* but leave incoming alone so we can see response */ * but leave incoming alone so we can see response */
shutdown(cfd, 1); shutdown(cfd, SHUT_WR);
FD_CLR(STDIN_FILENO, &readfds); FD_CLR(STDIN_FILENO, &readfds);
} }
ofd = cfd; ofd = cfd;