summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpgen <p.gen.progs@gmail.com>2020-11-06 23:05:40 +0100
committerpgen <p.gen.progs@gmail.com>2020-11-06 23:05:40 +0100
commit255863a5c6474c3be1e13655a10a4c26f4afd98f (patch)
treee0791d89c5613b06fb0b0195a417be1fe913807f
parent7565b4f672038241ef955094c03847279ae869fa (diff)
Clean the timeout (-x|-X) management code
-rw-r--r--smenu.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/smenu.c b/smenu.c
index 429bff2..f50d685 100644
--- a/smenu.c
+++ b/smenu.c
@@ -7084,14 +7084,17 @@ main(int argc, char * argv[])
"[ s before selecting the current highlighted word]");
break;
case WORD:
- timeout_message = xcalloc(1, 4
- + strlen(
- "[ s before selecting the word ")
- + strlen(timeout_word));
- strcpy(timeout_message, "[ s before selecting the word \"");
+ {
+ char * s = "[ s before selecting the word \"";
+
+ timeout_message = xcalloc(1, 4 + strlen(s) + strlen(timeout_word));
+
+ strcpy(timeout_message, s);
strcat(timeout_message, timeout_word);
strcat(timeout_message, "\"]");
+
break;
+ }
default:
/* The other cases are impossible due to options analysis */