diff options
author | deraadt <> | 2017-04-16 15:11:01 +0000 |
---|---|---|
committer | deraadt <> | 2017-04-16 15:11:01 +0000 |
commit | 1e00e5172df99c9d47db6676f2f1eda293009fbf (patch) | |
tree | 9b3097254a2117b02427c523026c1931a2c9cbe1 /src/usr.bin/nc/netcat.c | |
parent | 093c3e8ed8b4d97e56d6f66c4c6c48f1b1928207 (diff) | |
download | openbsd-1e00e5172df99c9d47db6676f2f1eda293009fbf.tar.gz openbsd-1e00e5172df99c9d47db6676f2f1eda293009fbf.tar.bz2 openbsd-1e00e5172df99c9d47db6676f2f1eda293009fbf.zip |
Move comments into a block and uses {} to unconfuse reading.
Diffstat (limited to 'src/usr.bin/nc/netcat.c')
-rw-r--r-- | src/usr.bin/nc/netcat.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/usr.bin/nc/netcat.c b/src/usr.bin/nc/netcat.c index 4d81709bd0..bd9fb09a0f 100644 --- a/src/usr.bin/nc/netcat.c +++ b/src/usr.bin/nc/netcat.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: netcat.c,v 1.180 2017/04/05 06:55:59 jmc Exp $ */ | 1 | /* $OpenBSD: netcat.c,v 1.181 2017/04/16 15:11:01 deraadt Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2001 Eric Jackson <ericj@monkey.org> | 3 | * Copyright (c) 2001 Eric Jackson <ericj@monkey.org> |
4 | * Copyright (c) 2015 Bob Beck. All rights reserved. | 4 | * Copyright (c) 2015 Bob Beck. All rights reserved. |
@@ -540,18 +540,19 @@ main(int argc, char *argv[]) | |||
540 | s = local_listen(host, uport, hints); | 540 | s = local_listen(host, uport, hints); |
541 | if (s < 0) | 541 | if (s < 0) |
542 | err(1, NULL); | 542 | err(1, NULL); |
543 | /* | 543 | if (uflag && kflag) { |
544 | * For UDP and -k, don't connect the socket, let it | 544 | /* |
545 | * receive datagrams from multiple socket pairs. | 545 | * For UDP and -k, don't connect the socket, |
546 | */ | 546 | * let it receive datagrams from multiple |
547 | if (uflag && kflag) | 547 | * socket pairs. |
548 | */ | ||
548 | readwrite(s, NULL); | 549 | readwrite(s, NULL); |
549 | /* | 550 | } else if (uflag && !kflag) { |
550 | * For UDP and not -k, we will use recvfrom() initially | 551 | /* |
551 | * to wait for a caller, then use the regular functions | 552 | * For UDP and not -k, we will use recvfrom() |
552 | * to talk to the caller. | 553 | * initially to wait for a caller, then use |
553 | */ | 554 | * the regular functions to talk to the caller. |
554 | else if (uflag && !kflag) { | 555 | */ |
555 | int rv, plen; | 556 | int rv, plen; |
556 | char buf[16384]; | 557 | char buf[16384]; |
557 | struct sockaddr_storage z; | 558 | struct sockaddr_storage z; |