[Libvir] PATCH 9/20: unify the two buffer implemenations
Richard W.M. Jones
rjones at redhat.com
Tue Jun 26 15:03:20 UTC 2007
Daniel P. Berrange wrote:
> This patch moves the previously created qemud/buf.c file into the src/
> directory and deletes the original implementation in src/xml.c. The
> qemud/Makefile.am is hacked to compile the code from src/buf.c directly.
> This hack will go away in a later patch.
No, this is wrong. The two buffer implementations aren't quite the
same, because the one inside src/xml.c sets virterror, whereas the one
in qemud/buf.c doesn't:
- virXMLError(NULL, VIR_ERR_NO_MEMORY, _("growing buffer"), size);
So there are some calls to the src/xml.c version which are doing stuff like:
buf = virBufferNew(500);
if (buf == NULL) return -1; // virBufferNew has set virterror
I would prefer my patch (see recent email) to go in instead of 8/20 and
9/20, for this reason and also because my patch creates a separate lib/
subdir which I want to use for other library functions.
Rich.
--
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in
England and Wales under Company Registration No. 03798903
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20070626/06459dcb/attachment-0001.bin>
More information about the libvir-list
mailing list