commit 5440796f312267a02c0d8b8b8cb2314e1e9fa807
parent a9aa0ef997fd406bcf8b82d9ebe03e47a8a197f3
Author: Benno Schulenberg <bensberg@justemail.net>
Date: Sun, 16 Aug 2015 08:49:29 +0000
Reducing the scope of a variable.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5359 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Diffstat:
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,6 +1,7 @@
2015-08-16 Benno Schulenberg <bensberg@justemail.net>
* src/help.c (help_init, help_line_len): Avoid wide paragraphs of text
in the help screens: wrap them at 74 columns if the screen is wider.
+ * src/help.c (help_init): Reduce the scope of a variable.
2015-08-13 Benno Schulenberg <bensberg@justemail.net>
* src/search.c (do_find_bracket): Remove mistaken comparison between
diff --git a/src/help.c b/src/help.c
@@ -198,7 +198,6 @@ void help_init(void)
char *ptr;
const subnfunc *f;
const sc *s;
- int scsfound = 0;
#ifndef NANO_TINY
bool old_whitespace = ISSET(WHITESPACE_DISPLAY);
@@ -408,12 +407,13 @@ void help_init(void)
/* Now add our shortcut info. */
for (f = allfuncs; f != NULL; f = f->next) {
+ int scsfound = 0;
if ((f->menus & currmenu) == 0)
continue;
/* Let's simply show the first two shortcuts from the list. */
- for (s = sclist, scsfound = 0; s != NULL; s = s->next) {
+ for (s = sclist; s != NULL; s = s->next) {
if ((s->menus & currmenu) == 0)
continue;