From 092218dea7a9c0a2ada1d50a5db1ae37fd25e21b Mon Sep 17 00:00:00 2001
From: "C. McEnroe" <june@causal.agency>
Date: Thu, 2 Apr 2020 16:53:52 -0400
Subject: Use for loop for getopt in calico

---
 dispatch.c | 3 +--
 1 file changed, 1 insertion(+), 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;
-- 
cgit 1.4.1