[libvirt] [PATCH V2] libxl: don't overwrite error from virNetSocketNewConnectTCP()
mprivozn at redhat.com
Fri Sep 4 08:21:59 UTC 2015
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 at suse.com>
>> 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(-)
> Also noteworthy that virNetSocketNewConnectTCP could overwrite errno
> when freeaddrinfo is run in error: or when VIR_FORCE_CLOSE() did it's
I don't think that either of those overwrites errno. Here's
freeaddrinfo() impl that I've found in glibc:
freeaddrinfo (struct addrinfo *ai)
struct addrinfo *p;
while (ai != NULL)
p = ai;
ai = ai->ai_next;
And VIR_FORCE_CLOSE() preserves errno too. But nevertheless, ACK stands.
More information about the libvir-list