about summary refs log tree commit diff
path: root/ui.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-03-30 19:44:45 -0400
committerJune McEnroe <june@causal.agency>2020-03-30 19:44:45 -0400
commitff783628268470acc02e52126d6a357691723fba (patch)
treeafde924a98359080d9fc329ea4bd133e50ee735d /ui.c
parentAdd text macros (diff)
downloadcatgirl-ff783628268470acc02e52126d6a357691723fba.tar.gz
catgirl-ff783628268470acc02e52126d6a357691723fba.zip
Replace some declaration; while loops with for loops
I should have been using this for getopt loops already but the call here
is slightly too long to fit on one line as a for loop.
Diffstat (limited to 'ui.c')
-rw-r--r--ui.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ui.c b/ui.c
index 9c1b238..02f8979 100644
--- a/ui.c
+++ b/ui.c
@@ -945,10 +945,9 @@ void uiRead(void) {
 		}
 	}
 
-	int ret;
 	wint_t ch;
 	static bool paste, style;
-	while (ERR != (ret = wget_wch(input, &ch))) {
+	for (int ret; ERR != (ret = wget_wch(input, &ch));) {
 		if (ret == KEY_CODE_YES && ch == KeyPasteOn) {
 			paste = true;
 		} else if (ret == KEY_CODE_YES && ch == KeyPasteOff) {