From e8272623b17786d53fedf4bf5acd9afc60ddeea7 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Tue, 6 Sep 2022 21:02:58 -0700 Subject: [PATCH] smyrna load_mouse_actions: remove shadowing of 'line' global --- cmd/smyrna/hotkeymap.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cmd/smyrna/hotkeymap.c b/cmd/smyrna/hotkeymap.c index c43b9e5a1..23b3c35f6 100644 --- a/cmd/smyrna/hotkeymap.c +++ b/cmd/smyrna/hotkeymap.c @@ -116,18 +116,17 @@ void load_mouse_actions(ViewInfo * v) /*file parsing is temporarrily not available */ int i = 0; FILE *file; - char line[BUFSIZ]; + char linebuf[BUFSIZ]; char *a; char *action_file = smyrnaPath("mouse_actions.txt"); file = fopen(action_file, "r"); if (file != NULL) { int ind = 0; - while (fgets(line, BUFSIZ, file) != NULL) { + while (fgets(linebuf, BUFSIZ, file) != NULL) { int idx = 0; - a = strtok(line, ","); + a = strtok(linebuf, ","); - if ((line[0] == '#') || (line[0] == ' ') - || (strlen(line) == 0)) + if (linebuf[0] == '#' || linebuf[0] == ' ' || strlen(linebuf) == 0) continue; v->mouse_actions = gv_recalloc(v->mouse_actions, v->mouse_action_count, -- 2.40.0