diff options
author | David Lamparter <equinox@diac24.net> | 2019-12-04 04:20:55 +0100 |
---|---|---|
committer | David Lamparter <equinox@diac24.net> | 2019-12-06 15:13:32 +0100 |
commit | f210b3e3002e2918e912cd5e49c43e874a55e40d (patch) | |
tree | 19c3482ead49d05828a3ff0c99601f0ffda9cae6 /lib/defaults.c | |
parent | lib: new defaults logic (diff) | |
download | frr-f210b3e3002e2918e912cd5e49c43e874a55e40d.tar.xz frr-f210b3e3002e2918e912cd5e49c43e874a55e40d.zip |
lib/defaults: add bool variable support
(I hadn't initially added this because I thought it superfluous, but it
kinda makes things nicer.)
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'lib/defaults.c')
-rw-r--r-- | lib/defaults.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/defaults.c b/lib/defaults.c index 8a1cfebe1..71ccc73cc 100644 --- a/lib/defaults.c +++ b/lib/defaults.c @@ -166,6 +166,8 @@ static void frr_default_apply_one(struct frr_default *dflt, bool check) if (!saveentry) saveentry = entry; + if (dflt->dflt_bool) + *dflt->dflt_bool = dfltentry->val_bool; if (dflt->dflt_str) *dflt->dflt_str = dfltentry->val_str; if (dflt->dflt_long) @@ -174,6 +176,8 @@ static void frr_default_apply_one(struct frr_default *dflt, bool check) *dflt->dflt_ulong = dfltentry->val_ulong; if (dflt->dflt_float) *dflt->dflt_float = dfltentry->val_float; + if (dflt->save_bool) + *dflt->save_bool = saveentry->val_bool; if (dflt->save_str) *dflt->save_str = saveentry->val_str; if (dflt->save_long) |