commit | 29ec3156ee66b6e2553a0adb2f35cb143edddc5f | [log] [tgz] |
---|---|---|
author | Luiz Capitulino <lcapitulino@redhat.com> | Mon Dec 14 18:53:20 2009 -0200 |
committer | Anthony Liguori <aliguori@us.ibm.com> | Fri Dec 18 11:26:27 2009 -0600 |
tree | 32cbacc1ba3a98d50614aac0a976fc53d411378d | |
parent | 18dd19a7d9bb90734b5188fd6f53c76bde711e4b [diff] [blame] |
QDict: Fix size update Key replacement should not update the dictionary's size. This commit also adds a test for the bug. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
diff --git a/qdict.c b/qdict.c index ef73265..ba8eef0 100644 --- a/qdict.c +++ b/qdict.c
@@ -122,9 +122,8 @@ /* allocate a new entry */ entry = alloc_entry(key, value); QLIST_INSERT_HEAD(&qdict->table[hash], entry, next); + qdict->size++; } - - qdict->size++; } /**