mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user