This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH 2/4] getaddrinfo: Avoid negating error values
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Pavel Simerda <psimerda at redhat dot com>
- Cc: libc-alpha <libc-alpha at sourceware dot org>, Siddhesh Poyarekar <siddhesh at redhat dot com>
- Date: Mon, 9 Dec 2013 18:00:24 +0000
- Subject: Re: [PATCH 2/4] getaddrinfo: Avoid negating error values
- Authentication-results: sourceware.org; auth=none
- References: <985143588 dot 23954443 dot 1386596438799 dot JavaMail dot root at redhat dot com>
On Mon, 9 Dec 2013, Pavel Simerda wrote:
> There's no reason for negating the error values in the current code.
Could you clarify the underlying analysis more? Is it always the case in
the present code that the error numbers get negated an even number of
times on their way to the user, and this patch changes that number to be
0? What's the before-and-after interface for which functions return an
error number, or a negated error number, and what are the users for
functions whose return value semantics you've changed? Do none of those
functions have a comment above them describing the return value semantics,
which would need updating?
Joseph S. Myers