[libvirt] [PATCH 19/23] util: replace gethostname() with g_get_hostname()
Daniel P. Berrangé
berrange at redhat.com
Fri Jan 3 11:19:57 UTC 2020
On Thu, Jan 02, 2020 at 05:42:39PM +0100, Fabiano Fidêncio wrote:
> [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?
Yes, it should use ignore_value()
>
> [snip]
>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
More information about the libvir-list
mailing list