cfg: Fix behavior of cfg_get(0, "a") when a key "a.b" exists.
authorBen Pfaff <blp@nicira.com>
Thu, 5 Mar 2009 19:13:49 +0000 (11:13 -0800)
committerBen Pfaff <blp@nicira.com>
Thu, 5 Mar 2009 19:13:49 +0000 (11:13 -0800)
commita5a9b6320ba30a836716b049baf1d35bbe6b058c
tree346e08da06de1fa8d12c904048b7ee505bee99c3
parent8805128e4d6e5e775afaaf9e6fb47905510ef6e4
cfg: Fix behavior of cfg_get(0, "a") when a key "a.b" exists.

The intent of cfg_get_*(0, "a") is to get the first value of a key with
the exact name "a", but in the presence of a key with a longer name, e.g.
"a.b", it would return the value of that key instead.

This file really needs a unit test!  I'm really not certain that
the fix didn't break other things (e.g. cfg_has_section()).
lib/cfg.c