]> git.proxmox.com Git - mirror_frr.git/commitdiff
mgmtd: fix clang uninit warning
authorChristian Hopps <chopps@labn.net>
Sat, 20 May 2023 18:55:31 +0000 (14:55 -0400)
committerChristian Hopps <chopps@labn.net>
Tue, 30 May 2023 06:10:20 +0000 (02:10 -0400)
Signed-off-by: Christian Hopps <chopps@labn.net>
lib/vty.c

index 51c2ebdc55dc4805143431c51a4f157357715fdc..ab709ef4c9e5a9a96eeea97ab8abc9eaddd43dac 100644 (file)
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -2190,6 +2190,7 @@ bool mgmt_vty_read_configs(void)
        FILE *confp;
        uint line_num = 0;
        uint count = 0;
+       uint index;
 
        vty = vty_new();
        vty->wfd = STDERR_FILENO;
@@ -2201,7 +2202,8 @@ bool mgmt_vty_read_configs(void)
        vty->mgmt_locked_candidate_ds = true;
        mgmt_candidate_ds_wr_locked = true;
 
-       for (uint index = 0; index < mgmt_daemons_count; index++) {
+
+       for (index = 0; index < array_size(mgmt_daemons); index++) {
                snprintf(path, sizeof(path), "%s/%s.conf", frr_sysconfdir,
                         mgmt_daemons[index]);