]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib/defaults: don't use "static" in a weird way
authorDavid Lamparter <equinox@diac24.net>
Tue, 14 Apr 2020 11:23:57 +0000 (13:23 +0200)
committerDavid Lamparter <equinox@diac24.net>
Tue, 14 Apr 2020 11:25:25 +0000 (13:25 +0200)
This didn't break anything but it's not really correct either.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
lib/defaults.c

index 4dcfe2899b0f040725cabc6fc49047d0324049f9..7466aad5b15462afb55c4adffcb410f6b1f17cb5 100644 (file)
@@ -100,10 +100,10 @@ static bool frr_match_version(const char *name, const char *vspec,
                              const char *version, bool check)
 {
        int cmp;
-       static struct spec {
+       static const struct spec {
                const char *str;
                int dir, eq;
-       } *s, specs[] = {
+       } specs[] = {
                {"<=", -1, 1},
                {">=", 1, 1},
                {"==", 0, 1},
@@ -112,6 +112,7 @@ static bool frr_match_version(const char *name, const char *vspec,
                {"=", 0, 1},
                {NULL, 0, 0},
        };
+       const struct spec *s;
 
        if (!vspec)
                /* NULL = all versions */