mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Use virBufferTrimLen when applicable
Replace all the cases that only supply the length and do not care about matching a suffix, as well as that one test case that does. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
@@ -108,9 +108,9 @@ static int testBufTrim(const void *data G_GNUC_UNUSED)
|
||||
virBufferAddLit(buf, "a;");
|
||||
virBufferTrim(buf, "", 0);
|
||||
virBufferTrim(buf, "", -1);
|
||||
virBufferTrim(buf, NULL, 1);
|
||||
virBufferTrim(buf, NULL, 5);
|
||||
virBufferTrim(buf, "a", 2);
|
||||
virBufferTrimLen(buf, 1);
|
||||
virBufferTrimLen(buf, 5);
|
||||
virBufferTrimLen(buf, 2);
|
||||
|
||||
virBufferAddLit(buf, ",b,,");
|
||||
virBufferTrim(buf, NULL, -1);
|
||||
|
||||
Reference in New Issue
Block a user