svn commit: r268750 - head/usr.bin/timeout

Konstantin Belousov kostikbel at gmail.com
Wed Jul 16 12:19:05 UTC 2014


On Wed, Jul 16, 2014 at 11:41:28AM +0000, Baptiste Daroussin wrote:
> Author: bapt
> Date: Wed Jul 16 11:41:28 2014
> New Revision: 268750
> URL: http://svnweb.freebsd.org/changeset/base/268750
> 
> Log:
>   Sort headers
>   Constify long options
>   Remove useless call to sigemptyset
>   properly check errno when waiting for a process status when a SIGCHLD is received
> 
> Modified:
>   head/usr.bin/timeout/timeout.c
> 
> Modified: head/usr.bin/timeout/timeout.c
> ==============================================================================
> --- head/usr.bin/timeout/timeout.c	Wed Jul 16 11:30:04 2014	(r268749)
> +++ head/usr.bin/timeout/timeout.c	Wed Jul 16 11:41:28 2014	(r268750)
> @@ -28,20 +28,18 @@
>  #include <sys/cdefs.h>
>  __FBSDID("$FreeBSD$");
>  
> -#include <sys/types.h>
> -#include <sys/time.h>
> -#include <sys/wait.h>
> +#include <err.h>
> +#include <errno.h>
> +#include <getopt.h>
>  #include <signal.h>
> +#include <stdbool.h>
>  #include <stdio.h>
>  #include <stdlib.h>
>  #include <string.h>
> +#include <sys/time.h>
> +#include <sys/wait.h>
>  #include <sysexits.h>
>  #include <unistd.h>
> -#include <getopt.h>
> -#include <err.h>
> -#include <spawn.h>
> -#include <errno.h>
> -#include <stdbool.h>
This is not proper sorting.  sys/*.h comes first, usermode headers
second.
>  
>  #define EXIT_TIMEOUT 124
>  
> @@ -188,7 +186,7 @@ main(int argc, char **argv)
>  	cpid = -1;
>  	pgid = -1;
>  
> -	struct option longopts[] = {
> +	const struct option longopts[] = {
I noted that this should be static const, not just const.

The curious tendency of late is people committing changes without
getting final confirmation from reviewer. Asking to look at the patch
before commit would avoid repo churn.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20140716/60e8e7c9/attachment.sig>


More information about the svn-src-all mailing list