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(a)redhat.com +1-801-349-2682
Libvirt virtualization library
http://libvirt.org