mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
util: buffer: Remove struct member munging
This was meant to stop abusing the members directly, but we don't do this for other internal structs. Additionally this did not stop the test from touching the members. Remove the header obscurization. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Laine Stump <laine@laine.org> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
@@ -29,7 +29,7 @@ static int testBufInfiniteLoop(const void *data)
|
||||
* which was the case after the above addchar at the time of the bug.
|
||||
* This test is a bit fragile, since it relies on virBuffer internals.
|
||||
*/
|
||||
if (virAsprintf(&addstr, "%*s", buf->a - buf->b - 1, "a") < 0)
|
||||
if (virAsprintf(&addstr, "%*s", buf->size - buf->use - 1, "a") < 0)
|
||||
goto out;
|
||||
|
||||
if (info->doEscape)
|
||||
|
||||
Reference in New Issue
Block a user