On a Thursday in 2021, Michal Privoznik wrote:
What we are using really is heap allocated structure rather than
stack allocated. And for that it's better to use g_autoptr() +
G_DEFINE_AUTOPTR_CLEANUP_FUNC() combo, as Glib documentation for
g_auto() reads:
This is meant to be used with stack-allocated structures and
non-pointer types. For the (more commonly used) pointer
version, see g_autoptr().
This will be even more visible, when virSysinfoDefPtr type is
gone. Stay tuned.
Fixes: cee3a900a0d6a8fc79554db22dc262632fe487a6
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/util/virsysinfo.c | 8 ++++----
src/util/virsysinfo.h | 2 +-
tests/sysinfotest.c | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
Reviewed-by: Ján Tomko <jtomko(a)redhat.com>
Jano