From 16b16a72e54e05c5ad2c251c2a9c71a92ff11400 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Tue, 31 Mar 2020 10:17:21 -0400 Subject: Replace int opt; while with for loop in sandman --- scripts/sandman.m | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/sandman.m b/scripts/sandman.m index 838920d..99899ab 100644 --- a/scripts/sandman.m +++ b/scripts/sandman.m @@ -44,8 +44,7 @@ static void handler(int signal) { int main(int argc, char *argv[]) { uint delay = 8; - int opt; - while (0 < (opt = getopt(argc, argv, "t:"))) { + for (int opt; 0 < (opt = getopt(argc, argv, "t:"));) { switch (opt) { break; case 't': delay = strtoul(optarg, NULL, 10); break; default: return EX_USAGE; -- cgit 1.4.1