Changeset
src/util/virbuffer.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Git apply log
Switched to a new branch '17e1b2e5542d40dcd569d120e36c057456ee37bf.1526043377.git.mprivozn@redhat.com'
Applying: virbuffer: Set child buffer indent properly
To https://github.com/patchew-project/libvirt
 + 5649e47...303eebc patchew/17e1b2e5542d40dcd569d120e36c057456ee37bf.1526043377.git.mprivozn@redhat.com -> patchew/17e1b2e5542d40dcd569d120e36c057456ee37bf.1526043377.git.mprivozn@redhat.com (forced update)
Test passed: syntax-check

loading

[libvirt] [PATCH] virbuffer: Set child buffer indent properly
Posted by Michal Privoznik, 1 week ago
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>
---
 src/util/virbuffer.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/virbuffer.h b/src/util/virbuffer.h
index 4f5ed162fb..e95ee878a1 100644
--- a/src/util/virbuffer.h
+++ b/src/util/virbuffer.h
@@ -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);
 
-- 
2.16.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] virbuffer: Set child buffer indent properly
Posted by Ján Tomko, 1 week ago
On Fri, May 11, 2018 at 02:56:17PM +0200, Michal Privoznik wrote:
>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>
>---
> src/util/virbuffer.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>

Reviewed-by: J�n Tomko <jtomko@redhat.com>

Jano
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list