]> granicus.if.org Git - graphviz/commitdiff
smyrna load_mouse_actions: remove shadowing of 'line' global
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 7 Sep 2022 04:02:58 +0000 (21:02 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 10 Sep 2022 00:11:28 +0000 (17:11 -0700)
cmd/smyrna/hotkeymap.c

index c43b9e5a1898e9f0935c99e52a681194fdec792a..23b3c35f60f1163006ff69b023f4fdbd587426aa 100644 (file)
@@ -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,