[libvirt] [PATCH 3/5] factor common code in virHashAddEntry and virHashUpdateEntry
Eric Blake
eblake at redhat.com
Thu Feb 17 23:50:54 UTC 2011
On 02/17/2011 02:14 PM, Christophe Fergeau wrote:
> The only difference between these 2 functions is that one errors
> out when the entry is already present while the other modifies
> the existing entry. Add an helper function with a boolean argument
> indicating whether existing entries should be updated or not, and
> use this helper in both functions.
> ---
> src/util/hash.c | 116 +++++++++++++++++++------------------------------------
> 1 files changed, 40 insertions(+), 76 deletions(-)
ACK, and the diffstat shows how nice it is.
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110217/1e10925b/attachment-0001.sig>
More information about the libvir-list
mailing list