[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: |
Greg Troxel |
Subject: |
Re: [gpsd-dev] [PATCH v3 1/1] gps2udp: reset errno after successful getaddrinfo call |
Date: |
Fri, 03 Jan 2014 14:26:09 -0500 |
User-agent: |
Gnus/5.130006 (Ma Gnus v0.6) Emacs/23.4 (berkeley-unix) |
Ferry Huberts <address@hidden> writes:
> I was asked by Gary Miller to further look into why errno wasn't zero.
> I did. I fixed the root cause.
>
> I'm thoroughly confused by what you guys actually want.
The point is that looking at errno other than immediately after getting
an error return from a system call that is documented to set errno on
error is a bug.
The root cause fix is not to look at it otherwise, and adding kludges to
make it be zero is not helpful.
After atoi, open_udp checks errno and finds it at 2, left behind by
the netlib_connectsock function.
atoi is not documented to set errno. Therefore the code to look at
errno after atoi is buggy and should be removed.
pgpY_A49hmf2C.pgp
Description: PGP signature
- [gpsd-dev] [PATCH v3 1/1] gps2udp: reset errno after successful getaddrinfo call, Ferry Huberts, 2014/01/03
- Re: [gpsd-dev] [PATCH v3 1/1] gps2udp: reset errno after successful getaddrinfo call, Mike Frysinger, 2014/01/03
- Re: [gpsd-dev] [PATCH v3 1/1] gps2udp: reset errno after successful getaddrinfo call, Ferry Huberts, 2014/01/03
- Re: [gpsd-dev] [PATCH v3 1/1] gps2udp: reset errno after successful getaddrinfo call, Mike Frysinger, 2014/01/03
- Re: [gpsd-dev] [PATCH v3 1/1] gps2udp: reset errno after successful getaddrinfo call, Ferry Huberts, 2014/01/03
- Re: [gpsd-dev] [PATCH v3 1/1] gps2udp: reset errno after successful getaddrinfo call, Mike Frysinger, 2014/01/03
- Re: [gpsd-dev] [PATCH v3 1/1] gps2udp: reset errno after successful getaddrinfo call, Ferry Huberts, 2014/01/03
- Re: [gpsd-dev] [PATCH v3 1/1] gps2udp: reset errno after successful getaddrinfo call,
Greg Troxel <=
- Re: [gpsd-dev] [PATCH v3 1/1] gps2udp: reset errno after successful getaddrinfo call, Gary E. Miller, 2014/01/03
- Re: [gpsd-dev] [PATCH v3 1/1] gps2udp: reset errno after successful getaddrinfo call, Ferry Huberts, 2014/01/03
- Re: [gpsd-dev] [PATCH v3 1/1] gps2udp: reset errno after successful getaddrinfo call, Mike Frysinger, 2014/01/03
- Re: [gpsd-dev] [PATCH v3 1/1] gps2udp: reset errno after successful getaddrinfo call, Gary E. Miller, 2014/01/03
Re: [gpsd-dev] [PATCH v3 1/1] gps2udp: reset errno after successful getaddrinfo call, Gary E. Miller, 2014/01/03