]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virDomainMomentAssignDef: Simplify error handling
authorPeter Krempa <pkrempa@redhat.com>
Wed, 12 Jan 2022 09:28:23 +0000 (10:28 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 14 Jan 2022 17:05:29 +0000 (18:05 +0100)
commitebfe9b1a158a917f89bda45e4d93b9a8d88339ad
tree04c142457a898adaf7b856cbd883b3fb25f7e594
parentabf9eac87ccaf6ad6f501ccf34ca5dd10fe7b10b
virDomainMomentAssignDef: Simplify error handling

Remove error handling from the call to 'virDomainMomentObjNew' as it
can't return NULL and replace 'virHashAddEntry' by 'g_hash_table_insert'
as we've already checked that snapshot with such name doesn't exist in
the hash table. This removes handling for two impossible errors.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/conf/virdomainmomentobjlist.c