summaryrefslogtreecommitdiffstats
path: root/lib/defaults.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2020-04-14 13:23:57 +0200
committerDavid Lamparter <equinox@diac24.net>2020-04-14 13:25:25 +0200
commitd29c01db81cd55f09ec3de75b3df611e364bddc6 (patch)
tree7b176267d3313d237afe5b52c2487d99e878bd8f /lib/defaults.c
parentlib/defaults: more bool confusion (diff)
downloadfrr-d29c01db81cd55f09ec3de75b3df611e364bddc6.tar.xz
frr-d29c01db81cd55f09ec3de75b3df611e364bddc6.zip
lib/defaults: don't use "static" in a weird way
This didn't break anything but it's not really correct either. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/defaults.c')
-rw-r--r--lib/defaults.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/defaults.c b/lib/defaults.c
index 4dcfe2899..7466aad5b 100644
--- a/lib/defaults.c
+++ b/lib/defaults.c
@@ -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 */