gpsd-dev
[Top][All Lists]
Advanced

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

Re: [gpsd-dev] [PATCH v3 1/1] gps2udp: reset errno after successful geta


From: Mike Frysinger
Subject: Re: [gpsd-dev] [PATCH v3 1/1] gps2udp: reset errno after successful getaddrinfo call
Date: Fri, 3 Jan 2014 10:00:40 -0500
User-agent: KMail/1.13.7 (Linux/3.12.1; KDE/4.6.5; x86_64; ; )

On Friday 03 January 2014 09:29:29 Ferry Huberts wrote:
> On 03/01/14 15:18, Mike Frysinger wrote:
> > On Friday 03 January 2014 08:33:47 Ferry Huberts wrote:
> >> It may return errno==2 ("No such file or directory") when the file
> >> /etc/gai.conf is not present.
> >> 
> >> The observed effect was that the port number conversion considered
> >> a perfectly valid port number as invalid.
> > 
> > you still haven't really explained why this is the way to go.  functions
> > do not "return errno".  they return real values, and any code calling
> > those functions need to first check the return value *before* ever
> > looking at errno.
> 
> Which is exactly what happens here: the code bails out if the function
> call is not successful.

what code is bailing where ?

> The function call may set errno even though it succeeds.

that is not a bug
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]