[libvirt] [PATCH v2] util: Forbid calling hash APIs from iterator callback

Eric Blake eblake at redhat.com
Fri Mar 18 15:35:52 UTC 2011


On 03/17/2011 01:30 PM, Eric Blake wrote:
>> +++ b/src/util/hash.c
>> @@ -35,6 +35,12 @@
>>  
>>  /* #define DEBUG_GROW */
>>  
>> +#define virHashIterationError(ret)                                      \
>> +    do {                                                                \
>> +        VIR_ERROR0(_("Hash operation not allowed during iteration"));   \
>> +        return ret;                                                     \
>> +    } while (0)
> 
> ACK; nice helper macro.

Except that it causes 'make syntax-check' to fail.

Pushing this under the build-breaker rule:

diff --git i/po/POTFILES.in w/po/POTFILES.in
index 1ed2765..b2ab946 100644
--- i/po/POTFILES.in
+++ w/po/POTFILES.in
@@ -89,6 +89,7 @@ src/util/command.c
 src/util/conf.c
 src/util/dnsmasq.c
 src/util/event_poll.c
+src/util/hash.c
 src/util/hooks.c
 src/util/hostusb.c
 src/util/interface.c

-- 
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/20110318/1aed3199/attachment-0001.sig>


More information about the libvir-list mailing list