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>
This commit is contained in:
David Lamparter 2020-04-14 13:23:57 +02:00
parent 7b8c2b3d66
commit d29c01db81

View File

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