diff options
author | Warner Losh <imp@FreeBSD.org> | 2021-06-04 22:42:18 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2021-06-04 22:47:28 +0000 |
commit | 1b5bc3a54b60f6476cce7191a7618a9d52b95d7f (patch) | |
tree | 16b3a03dc2c5a0b365731f17603ed5018331bfd7 | |
parent | f13d72fd0b743a1fd97dd31f4abf19e8814c420b (diff) | |
download | src-1b5bc3a54b60f6476cce7191a7618a9d52b95d7f.tar.gz src-1b5bc3a54b60f6476cce7191a7618a9d52b95d7f.zip |
usbdump: style: Sort case statements alphabetically
Switch case statement for getopt args should be sorted alphabetically.
Sponsored by: Netflix
-rw-r--r-- | usr.sbin/usbdump/usbdump.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/usr.sbin/usbdump/usbdump.c b/usr.sbin/usbdump/usbdump.c index 00d3b8e8913b..3c4f93f80c72 100644 --- a/usr.sbin/usbdump/usbdump.c +++ b/usr.sbin/usbdump/usbdump.c @@ -834,6 +834,9 @@ main(int argc, char *argv[]) optstring = "b:d:hi:r:s:vw:f:"; while ((o = getopt(argc, argv, optstring)) != -1) { switch (o) { + case 'b': + b_arg = optarg; + break; case 'd': pp = optarg; if (pp[0] == 'u' && pp[1] == 'g' && pp[2] == 'e' && pp[3] == 'n') @@ -866,6 +869,20 @@ main(int argc, char *argv[]) } } break; + case 'f': + filt_unit = strtol(optarg, &pp, 10); + filt_ep = -1; + if (pp != NULL) { + if (*pp == '.') { + filt_ep = strtol(pp + 1, &pp, 10); + if (pp != NULL && *pp != 0) + usage(); + } else if (*pp != 0) { + usage(); + } + } + add_filter(filt_unit, filt_ep); + break; case 'i': i_arg = optarg; break; @@ -884,9 +901,6 @@ main(int argc, char *argv[]) if (snapshot == 0) snapshot = -1; break; - case 'b': - b_arg = optarg; - break; case 'v': verbose++; break; @@ -894,20 +908,6 @@ main(int argc, char *argv[]) w_arg = optarg; init_wfile(p); break; - case 'f': - filt_unit = strtol(optarg, &pp, 10); - filt_ep = -1; - if (pp != NULL) { - if (*pp == '.') { - filt_ep = strtol(pp + 1, &pp, 10); - if (pp != NULL && *pp != 0) - usage(); - } else if (*pp != 0) { - usage(); - } - } - add_filter(filt_unit, filt_ep); - break; default: usage(); /* NOTREACHED */ |