diff options
| author | Giorgos Keramidas <keramida@FreeBSD.org> | 2006-11-12 19:03:39 +0000 |
|---|---|---|
| committer | Giorgos Keramidas <keramida@FreeBSD.org> | 2006-11-12 19:03:39 +0000 |
| commit | d2d77d2aeec7b84f7205134f87f2409d8d543e03 (patch) | |
| tree | 8ce15ab6814291970674a29fe7b052c4b2db8576 /usr.bin/sockstat | |
| parent | 9167cd6392c26447fdc8c933b107298d2cae8fbf (diff) | |
Notes
Diffstat (limited to 'usr.bin/sockstat')
| -rw-r--r-- | usr.bin/sockstat/sockstat.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/usr.bin/sockstat/sockstat.c b/usr.bin/sockstat/sockstat.c index f128d38a5004..bd71c5352f92 100644 --- a/usr.bin/sockstat/sockstat.c +++ b/usr.bin/sockstat/sockstat.c @@ -713,17 +713,12 @@ main(int argc, char *argv[]) if (argc > 0) usage(); - /* - * If protos_defined remains -1, no -P was provided, so we have to - * set up the default protocol list in protos[] first. - */ - if (!opt_4 && !opt_6 && !opt_u && protos_defined == -1) { - opt_u = 1; - protos_defined = set_default_protos(); - } - - if (!opt_4 && !opt_6) + if ((!opt_4 && !opt_6) && protos_defined != -1) opt_4 = opt_6 = 1; + if (!opt_4 && !opt_6 && !opt_u) + opt_4 = opt_6 = opt_u = 1; + if ((opt_4 || opt_6) && protos_defined == -1) + protos_defined = set_default_protos(); if (!opt_c && !opt_l) opt_c = opt_l = 1; |
