summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-04-02 16:53:52 -0400
committerJune McEnroe <june@causal.agency>2020-04-02 16:53:52 -0400
commit092218dea7a9c0a2ada1d50a5db1ae37fd25e21b (patch)
tree56cb1c7113ebf63dcd8c99632878bb970cae0c86
parentGenerate short option string from long options (diff)
downloadpounce-092218dea7a9c0a2ada1d50a5db1ae37fd25e21b.tar.gz
pounce-092218dea7a9c0a2ada1d50a5db1ae37fd25e21b.zip
Use for loop for getopt in calico 1.2p1
-rw-r--r--dispatch.c3
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;
tr>2009-03-15fix segfault when displaying empty blobsEric Wong 2009-02-19Add support for HEAD requestsLars Hjemli 2009-02-19Add support for ETag in 'plain' viewLars Hjemli 2009-02-12ui-tree: escape ascii-text properly in hexdump viewLars Hjemli 2009-02-12Makefile: add doc-related targetsLars Hjemli