diff options
author | June McEnroe <june@causal.agency> | 2020-04-02 16:53:52 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-04-02 16:53:52 -0400 |
commit | 092218dea7a9c0a2ada1d50a5db1ae37fd25e21b (patch) | |
tree | 56cb1c7113ebf63dcd8c99632878bb970cae0c86 | |
parent | Generate short option string from long options (diff) | |
download | pounce-092218dea7a9c0a2ada1d50a5db1ae37fd25e21b.tar.gz pounce-092218dea7a9c0a2ada1d50a5db1ae37fd25e21b.zip |
Use for loop for getopt in calico 1.2p1
Diffstat (limited to '')
-rw-r--r-- | dispatch.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/dispatch.c b/dispatch.c index c558729..1396f66 100644 --- a/dispatch.c +++ b/dispatch.c @@ -151,8 +151,7 @@ int main(int argc, char *argv[]) { const char *path = NULL; int timeout = 1000; - int opt; - while (0 < (opt = getopt(argc, argv, "H:P:t:"))) { + for (int opt; 0 < (opt = getopt(argc, argv, "H:P:t:"));) { switch (opt) { break; case 'H': host = optarg; break; case 'P': port = optarg; |