* Re: [libvirt] [PATCH V2] libxl: don't overwrite error from virNetSocketNewConnectTCP()
[not found] <1441302033-20508-1-git-send-email-jfehlig@suse.com>
@ 2015-09-03 20:55 ` John Ferlan
[not found] ` <55E8B3DF.4040605@redhat.com>
1 sibling, 0 replies; 3+ messages in thread
From: John Ferlan @ 2015-09-03 20:55 UTC (permalink / raw)
To: Jim Fehlig, libvir-list; +Cc: ian.campbell, xen-devel
On 09/03/2015 01:40 PM, Jim Fehlig wrote:
> Remove redundant error reporting in libxlDomainMigrationPerform().
> virNetSocketNewConnectTCP() is perfectly capable of reporting
> sensible errors.
>
> Signed-off-by: Jim Fehlig <jfehlig@suse.com>
> ---
>
> V2:
> Actually try to compile the code and find saved_errno is no
> longer used - remove it.
>
> src/libxl/libxl_migration.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
ACK
John
Also noteworthy that virNetSocketNewConnectTCP could overwrite errno
when freeaddrinfo is run in error: or when VIR_FORCE_CLOSE() did it's
thing...
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [libvirt] [PATCH V2] libxl: don't overwrite error from virNetSocketNewConnectTCP()
[not found] ` <55E8B3DF.4040605@redhat.com>
@ 2015-09-04 2:44 ` Jim Fehlig
2015-09-04 8:21 ` Michal Privoznik
1 sibling, 0 replies; 3+ messages in thread
From: Jim Fehlig @ 2015-09-04 2:44 UTC (permalink / raw)
To: John Ferlan, libvir-list; +Cc: ian.campbell, xen-devel
On 09/03/2015 02:55 PM, John Ferlan wrote:
>
> On 09/03/2015 01:40 PM, Jim Fehlig wrote:
>> Remove redundant error reporting in libxlDomainMigrationPerform().
>> virNetSocketNewConnectTCP() is perfectly capable of reporting
>> sensible errors.
>>
>> Signed-off-by: Jim Fehlig <jfehlig@suse.com>
>> ---
>>
>> V2:
>> Actually try to compile the code and find saved_errno is no
>> longer used - remove it.
>>
>> src/libxl/libxl_migration.c | 7 +------
>> 1 file changed, 1 insertion(+), 6 deletions(-)
>>
> ACK
Thanks! Pushed now.
Regards,
Jim
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [libvirt] [PATCH V2] libxl: don't overwrite error from virNetSocketNewConnectTCP()
[not found] ` <55E8B3DF.4040605@redhat.com>
2015-09-04 2:44 ` Jim Fehlig
@ 2015-09-04 8:21 ` Michal Privoznik
1 sibling, 0 replies; 3+ messages in thread
From: Michal Privoznik @ 2015-09-04 8:21 UTC (permalink / raw)
To: John Ferlan, Jim Fehlig, libvir-list; +Cc: ian.campbell, xen-devel
On 03.09.2015 22:55, John Ferlan wrote:
>
>
> On 09/03/2015 01:40 PM, Jim Fehlig wrote:
>> Remove redundant error reporting in libxlDomainMigrationPerform().
>> virNetSocketNewConnectTCP() is perfectly capable of reporting
>> sensible errors.
>>
>> Signed-off-by: Jim Fehlig <jfehlig@suse.com>
>> ---
>>
>> V2:
>> Actually try to compile the code and find saved_errno is no
>> longer used - remove it.
>>
>> src/libxl/libxl_migration.c | 7 +------
>> 1 file changed, 1 insertion(+), 6 deletions(-)
>>
>
> ACK
>
> John
>
> Also noteworthy that virNetSocketNewConnectTCP could overwrite errno
> when freeaddrinfo is run in error: or when VIR_FORCE_CLOSE() did it's
> thing...
>
I don't think that either of those overwrites errno. Here's
freeaddrinfo() impl that I've found in glibc:
void
freeaddrinfo (struct addrinfo *ai)
{
struct addrinfo *p;
while (ai != NULL)
{
p = ai;
ai = ai->ai_next;
free (p->ai_canonname);
free (p);
}
}
And VIR_FORCE_CLOSE() preserves errno too. But nevertheless, ACK stands.
Michal
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-09-04 8:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1441302033-20508-1-git-send-email-jfehlig@suse.com>
2015-09-03 20:55 ` [libvirt] [PATCH V2] libxl: don't overwrite error from virNetSocketNewConnectTCP() John Ferlan
[not found] ` <55E8B3DF.4040605@redhat.com>
2015-09-04 2:44 ` Jim Fehlig
2015-09-04 8:21 ` Michal Privoznik
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.