Re: [libvirt] [PATCH] Replace gethostname by virGetHostname in xend_internal.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Cole Robinson wrote:
> On 10/23/2009 07:01 AM, Chris Lalancette wrote:
>> ---
>>  src/xen/xend_internal.c |   11 +----------
>>  1 files changed, 1 insertions(+), 10 deletions(-)
>>
>> diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c
>> index 27d215e..d3ab019 100644
>> --- a/src/xen/xend_internal.c
>> +++ b/src/xen/xend_internal.c
>> @@ -4342,21 +4342,12 @@ xenDaemonDomainMigratePrepare (virConnectPtr dconn,
>>                                 const char *dname ATTRIBUTE_UNUSED,
>>                                 unsigned long resource ATTRIBUTE_UNUSED)
>>  {
>> -    int r;
>> -    char hostname [HOST_NAME_MAX+1];
>> -
>>      /* If uri_in is NULL, get the current hostname as a best guess
>>       * of how the source host should connect to us.  Note that caller
>>       * deallocates this string.
>>       */
>>      if (uri_in == NULL) {
>> -        r = gethostname (hostname, HOST_NAME_MAX+1);
>> -        if (r == -1) {
>> -            virReportSystemError(dconn, errno,
>> -                                 _("unable to resolve name %s"), hostname);
>> -            return -1;
>> -        }
>> -        *uri_out = strdup (hostname);
>> +        *uri_out = virGetHostname();
>>          if (*uri_out == NULL) {
>>              virReportOOMError(dconn);
>>              return -1;
> 
> ACK

Thanks, committed.

-- 
Chris Lalancette

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]