[libvirt] [PATCH 07/19] util: buffer: Simplify handling of indent overflows

Ján Tomko jtomko at redhat.com
Thu Oct 24 14:31:23 UTC 2019


On Thu, Oct 24, 2019 at 03:56:25PM +0200, Peter Krempa wrote:
>Rather than setting usage error truncate the indentation level. Having
>the output string misformated is way more useful to figure out where the
>error lies rather than reporting an error after a giant formatter
>function.
>
>In testBufAutoIndent we now validate that the indentation is truncated
>and testBufAddBuffer2 is removed since it became bogus.
>
>Signed-off-by: Peter Krempa <pkrempa at redhat.com>
>---
> src/util/virbuffer.c |  8 ++++----
> tests/virbuftest.c   | 35 ++++-------------------------------
> 2 files changed, 8 insertions(+), 35 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20191024/0d2b5885/attachment-0001.sig>


More information about the libvir-list mailing list