This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 1/6] Add INLINE_SYSCALL_ERROR_RETURN
- From: Florian Weimer <fweimer at redhat dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Tue, 13 Oct 2015 14:38:46 +0200
- Subject: Re: [PATCH 1/6] Add INLINE_SYSCALL_ERROR_RETURN
- Authentication-results: sourceware.org; auth=none
- References: <20151012231925 dot GB17339 at intel dot com>
On 10/13/2015 01:19 AM, H.J. Lu wrote:
> +/* Set error number and return -1. A target may choose to return the
> + internal function, __syscall_error, which sets errno and returns -1. */
> +#define INLINE_SYSCALL_ERROR_RETURN(err) \
> + ({ \
> + __set_errno (err); \
> + -1; \
> + })
I think the name is unfortunate because it the macro does not contain a
return statement.
Perhaps INLINE_SYSCALL_SET_ERRNO would be a better name?
Florian