mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
virbuffer: Set child buffer indent properly
There's this macro virBufferSetChildIndent which sets offset of child buffer from given parent buffer. However, it is calling virBufferAdjustIndent() which only adds adjustment instead of calling virBufferSetIndent() which clears out any adjustment previously set. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
b3f75d9980
commit
ebad530e9f
@ -112,7 +112,7 @@ void virBufferSetIndent(virBufferPtr, int indent);
|
||||
* child buffer.
|
||||
*/
|
||||
# define virBufferSetChildIndent(childBuf_, parentBuf_) \
|
||||
virBufferAdjustIndent(childBuf_, virBufferGetIndent(parentBuf_, false) + 2)
|
||||
virBufferSetIndent(childBuf_, virBufferGetIndent(parentBuf_, false) + 2)
|
||||
|
||||
int virBufferGetIndent(const virBuffer *buf, bool dynamic);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user