diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2014-01-24 15:24:07 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2014-01-24 15:24:07 +0000 |
commit | a7e5cc5d2355bb711337d56452e1b0158866e883 (patch) | |
tree | e703b32cab7f769550c51833eca99239f82d8e2a /usr.sbin/traceroute | |
parent | 48e761911af1453b6eced401b94dd760bf49b7c4 (diff) |
Sort getopt cases, reduces diff to traceroute6
OK benno@
Diffstat (limited to 'usr.sbin/traceroute')
-rw-r--r-- | usr.sbin/traceroute/traceroute.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/usr.sbin/traceroute/traceroute.c b/usr.sbin/traceroute/traceroute.c index 259e2a36043..44e76b63056 100644 --- a/usr.sbin/traceroute/traceroute.c +++ b/usr.sbin/traceroute/traceroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: traceroute.c,v 1.86 2014/01/24 15:19:51 florian Exp $ */ +/* $OpenBSD: traceroute.c,v 1.87 2014/01/24 15:24:06 florian Exp $ */ /* $NetBSD: traceroute.c,v 1.10 1995/05/21 15:50:45 mycroft Exp $ */ /*- @@ -330,20 +330,9 @@ main(int argc, char *argv[]) while ((ch = getopt(argc, argv, "AcDdf:g:Ilm:nP:p:q:rSs:t:V:vw:x")) != -1) switch (ch) { - case 'S': - sump = 1; - break; case 'A': Aflag++; break; - case 'f': - errno = 0; - ep = NULL; - l = strtol(optarg, &ep, 10); - if (errno || !*optarg || *ep || l < 1 || l > max_ttl) - errx(1, "min ttl must be 1 to %u.", max_ttl); - first_ttl = (u_int8_t)l; - break; case 'c': incflag = 0; break; @@ -353,6 +342,14 @@ main(int argc, char *argv[]) case 'D': dump = 1; break; + case 'f': + errno = 0; + ep = NULL; + l = strtol(optarg, &ep, 10); + if (errno || !*optarg || *ep || l < 1 || l > max_ttl) + errx(1, "min ttl must be 1 to %u.", max_ttl); + first_ttl = (u_int8_t)l; + break; case 'g': if (lsrr >= MAX_LSRR) errx(1, "too many gateways; max %d", MAX_LSRR); @@ -433,6 +430,9 @@ main(int argc, char *argv[]) */ source = optarg; break; + case 'S': + sump = 1; + break; case 't': if (!map_tos(optarg, &tos)) { errno = 0; |