This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH,HURD] _hurd_select: check for invalid parameter values
- From: Roland McGrath <roland at hack dot frob dot com>
- To: Pino Toscano <toscano dot pino at tiscali dot it>
- Cc: libc-alpha at sourceware dot org, bug-hurd at gnu dot org
- Date: Fri, 20 Jul 2012 10:23:26 -0700 (PDT)
- Subject: Re: [PATCH,HURD] _hurd_select: check for invalid parameter values
- References: <201112061734.23764.toscano.pino@tiscali.it>
> * hurd/hurdselect.c (_hurd_select): Return EINVAL for negative
> `timeout' values.
> Return EINVAL for `nfds' values either negative or greater than
> FD_SETSIZE.
In a log entry, write a local variable name as FOO rather than `foo'.
> + to = timeout->tv_sec * 1000 +
> + (timeout->tv_nsec + 999999) / 1000000;
When splitting a line in the middle of an expression, the operator goes on
the second line, not the first. Add parentheses so that the second line
is indented to inside the opening parenthesis. i.e.:
to = (timeout->tv_sec * 1000
+ (timeout->tv_nsec + 999999) / 1000000);
With those cosmetic fixes, this change is fine.
Thanks,
Roland