Re: PATCH 9/20: unify the two buffer implemenations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]