]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virHashAddEntry: Report error on duplicate key
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 17 Aug 2015 19:01:07 +0000 (21:01 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 17 Aug 2015 21:34:08 +0000 (23:34 +0200)
commit1dc2587224cb773a0727d9e893ce64c283a8d30e
treed5a9667c33afba7068a2c7407f0a6a0b0b2edb77
parent890676d26b8a82d9840a59f3cb49a6f706a48cc5
virHashAddEntry: Report error on duplicate key

If this function fails, the error message is reported only in
some cases (e.g. OOM), but in some it's not (e.g. duplicate key).
This fact is painful and we should either not report error at all
or report the error in all possible cases. I vote for the latter.
Unfortunately, since the key may be an arbitrary value (not
necessarily a string) we can't report it in the error message.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/util/virhash.c