summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpgen <p.gen.progs@gmail.com>2022-04-19 22:40:35 +0200
committerpgen <p.gen.progs@gmail.com>2022-04-19 22:40:35 +0200
commit4c4d9f81cabe0335a572c8f69cb7e0b59a6e1a95 (patch)
treede226194d4e571b04137b80d6ac5a7040c07c243
parentd8f34044554e5dc1d85f471ab5cf92304d501210 (diff)
Continue the code simplification
-rw-r--r--smenu.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/smenu.c b/smenu.c
index 8fc43a4..2002d2a 100644
--- a/smenu.c
+++ b/smenu.c
@@ -763,6 +763,7 @@ ini_load(const char * filename, win_t * win, term_t * term, limit_t * limits,
/* Do nothing. */
/* """"""""""" */
}
+
if ((cnt = fscanf(f, " %63[^=;\n] = %255[^;\n]", name, value)))
{
if (cnt == 1)
@@ -781,6 +782,7 @@ ini_load(const char * filename, win_t * win, term_t * term, limit_t * limits,
if (error)
goto out;
}
+
if (fscanf(f, " ;%*[^\n]"))
{
/* To silence the compiler about unused results. */
@@ -4429,8 +4431,8 @@ get_line_last_word(long line, long last_line)
{
if (line == last_line)
return count - 1;
- else
- return first_word_in_line_a[line + 1] - 1;
+
+ return first_word_in_line_a[line + 1] - 1;
}
/* ==================================================================== */
@@ -9268,10 +9270,9 @@ main(int argc, char * argv[])
/* Find the first selectable word (if any) in the input stream. */
/* """""""""""""""""""""""""""""""""""""""""""""""""""""""""""" */
- for (first_selectable = 0;
- first_selectable < count && !word_a[first_selectable].is_selectable;
- first_selectable++)
- ;
+ first_selectable = 0;
+ while (first_selectable < count && !word_a[first_selectable].is_selectable)
+ first_selectable++;
/* If not found, abort. */
/* """""""""""""""""""" */