[libvirt] [PATCH 19/23] util: replace gethostname() with g_get_hostname()

Fabiano Fidêncio fidencio at redhat.com
Thu Jan 2 16:42:39 UTC 2020


[snip]

> -    r = gethostname(virLogHostname, sizeof(virLogHostname));
> -    if (r == -1) {
> -        ignore_value(virStrcpyStatic(virLogHostname, "(unknown)"));
> -    } else {
> -        NUL_TERMINATE(virLogHostname);
> -    }
> +    (void)g_get_host_name();

Why not use ignore_return() here?

[snip]





More information about the libvir-list mailing list