mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-01 17:35:17 +00:00
cputest: Avoid use of temporary variable in DO_TEST macro
Use g_free directly to free the returned pointer from virTestLogContentAndReset rather than store it in a temp variable which was necessary when we only allowed VIR_FREE. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com
This commit is contained in:
parent
0eefd2a00a
commit
473c54e788
@ -997,10 +997,8 @@ mymain(void)
|
|||||||
flags, result \
|
flags, result \
|
||||||
}; \
|
}; \
|
||||||
char *testLabel; \
|
char *testLabel; \
|
||||||
char *tmp; \
|
|
||||||
\
|
\
|
||||||
tmp = virTestLogContentAndReset(); \
|
g_free(virTestLogContentAndReset());\
|
||||||
VIR_FREE(tmp); \
|
|
||||||
\
|
\
|
||||||
testLabel = g_strdup_printf("%s(%s): %s", #api, \
|
testLabel = g_strdup_printf("%s(%s): %s", #api, \
|
||||||
virArchToString(arch), name); \
|
virArchToString(arch), name); \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user