]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: Introduce virBufferAddBuffer
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 19 Feb 2015 09:56:58 +0000 (10:56 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 25 Feb 2015 08:23:42 +0000 (09:23 +0100)
commit83c5467ee90514d2d684579ac9e5dd0d7b147bfa
treefffff27740e0fa7abfd01567a86b701b2df309d1
parentefd30e2e1cb2b9e467c225db92e8a16eb8de2632
util: Introduce virBufferAddBuffer

This API joins the following two lines:

char *s = virBufferContentAndReset(buf1);
virBufferAdd(buf2, s, -1);

into one:

virBufferAddBuffer(buf2, buf1);

With one exception: there's no re-indentation applied to @buf1.
The idea is, that in general both can have different indentation
(like the test I'm adding proves)

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/libvirt_private.syms
src/util/virbuffer.c
src/util/virbuffer.h
tests/virbuftest.c