mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +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 \
|
||||
}; \
|
||||
char *testLabel; \
|
||||
char *tmp; \
|
||||
\
|
||||
tmp = virTestLogContentAndReset(); \
|
||||
VIR_FREE(tmp); \
|
||||
g_free(virTestLogContentAndReset());\
|
||||
\
|
||||
testLabel = g_strdup_printf("%s(%s): %s", #api, \
|
||||
virArchToString(arch), name); \
|
||||
|
Loading…
x
Reference in New Issue
Block a user