From: Ben Pfaff Date: Wed, 15 Apr 2009 22:02:02 +0000 (-0700) Subject: cfg: Keep configuration sorted when adding entries. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=126cd8d362a32eb599af5ff0d6059647793a1423;p=openvswitch cfg: Keep configuration sorted when adding entries. Otherwise later cfg accesses are likely to assert-fail since the configuration is no longer sorted. --- diff --git a/lib/cfg.c b/lib/cfg.c index d588e642..63bfe0d8 100644 --- a/lib/cfg.c +++ b/lib/cfg.c @@ -500,6 +500,7 @@ cfg_add_entry(const char *entry_, ...) FORMAT_KEY(entry_, entry); svec_add_nocopy(&cfg, entry); + svec_sort(&cfg); svec_terminate(&cfg); dirty = true; }