From: Justin Pettit Date: Fri, 13 Mar 2009 23:36:20 +0000 (-0700) Subject: Fix cfg_del_section() function that was recently broken. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=67092727e5070297247905c6a97d9f745b174e8d;p=openvswitch Fix cfg_del_section() function that was recently broken. This was showing up when the bridge compatibiity module was attempting to delete a bridge. --- diff --git a/lib/cfg.c b/lib/cfg.c index 67f8152a..0bb50b42 100644 --- a/lib/cfg.c +++ b/lib/cfg.c @@ -516,10 +516,10 @@ cfg_del_section(const char *section_, ...) ds_put_char(§ion, '.'); va_end(args); - for (p = find_key_le(ds_cstr(§ion)); - *p && !strncmp(section.string, *p, section.length); - p++) { - svec_del(&cfg, *p); + for (p = cfg.names; *p; p++) { /* XXX this is inefficient */ + if (!strncmp(section.string, *p, section.length)) { + svec_del(&cfg, *p); + } } ds_destroy(§ion); dirty = true;