]> xenbits.xensource.com Git - libvirt.git/commit
virbuf: fix const-correctness
authorEric Blake <eblake@redhat.com>
Tue, 27 Sep 2011 19:50:03 +0000 (13:50 -0600)
committerEric Blake <eblake@redhat.com>
Thu, 20 Oct 2011 22:02:15 +0000 (16:02 -0600)
commit5c09b81be77cd050ddb8a63e33d0e8a855a3b91c
tree82fc5c2849bd65928ceb39e5ab9d9a50c1463fa1
parent52e3b3d1bbd97ed01794b8c53254a124ae5de0ee
virbuf: fix const-correctness

Although the compiler wasn't complaining (since it was the pointer,
rather than what was being pointed to, that was actually const), it
looks quite suspicious to call a function with an argument labeled
const when the nature of the pointer (virBufferPtr) is hidden behind
a typedef.  Dropping const makes the function declarations easier
to read.

* src/util/buf.h: Drop const from all functions that modify buffer
argument.
* src/util/buf.c (virBufferSetError, virBufferAdd)
(virBufferContentAndReset, virBufferFreeAndReset)
(virBufferAsprintf, virBufferVasprintf, virBufferEscapeString)
(virBufferEscapeSexpr, virBufferEscape): Fix fallout.
src/util/buf.c
src/util/buf.h