util: buffer: Simplify handling of indent overflows
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: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
Showing
想要评论请 注册 或 登录