]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: fix local variable shadowing global one 7568/head
authorIgor Ryzhov <iryzhov@nfware.com>
Thu, 19 Nov 2020 21:41:50 +0000 (00:41 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Thu, 19 Nov 2020 21:53:34 +0000 (00:53 +0300)
start_config and end_config are already used as function names in DEFUN,
so the current naming is a little bit confusing. Let's use different
names for arguments.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
lib/command.h
lib/lib_vty.c

index e529239f650d5c3c854c35fd56eaeeb2edda052c..1b0504101cf8ce1db483e86aedc0b8bc55a6fc8e 100644 (file)
@@ -531,8 +531,8 @@ extern int cmd_execute_command(vector, struct vty *,
 extern int cmd_execute_command_strict(vector, struct vty *,
                                      const struct cmd_element **);
 extern void cmd_init(int terminal);
-extern void cmd_init_config_callbacks(void (*start_config)(void),
-                                     void (*end_config)(void));
+extern void cmd_init_config_callbacks(void (*start_config_cb)(void),
+                                     void (*end_config_cb)(void));
 extern void cmd_terminate(void);
 extern void cmd_exit(struct vty *vty);
 extern int cmd_list_cmds(struct vty *vty, int do_permute);
index 8207aa20e6d261c21e7a9d71b8e9d6793dbbfb59..0cc25f24ed66052ab0ccbe388e16c67bfccce674 100644 (file)
@@ -255,11 +255,11 @@ DEFUN_HIDDEN (end_config,
        return CMD_SUCCESS;
 }
 
-void cmd_init_config_callbacks(void (*start_config)(void),
-                              void (*end_config)(void))
+void cmd_init_config_callbacks(void (*start_config_cb)(void),
+                              void (*end_config_cb)(void))
 {
-       callback.start_config = start_config;
-       callback.end_config = end_config;
+       callback.start_config = start_config_cb;
+       callback.end_config = end_config_cb;
 }