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

看板FB_svn作者時間11年前 (2014/07/16 20:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串4/4 (看更多)
--ucfHZChuBC0NsER/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 16, 2014 at 03:19:00PM +0300, Konstantin Belousov wrote: G > 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 > >=20 > > 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 > >=20 > > Modified: > > head/usr.bin/timeout/timeout.c > >=20 > > Modified: head/usr.bin/timeout/timeout.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- 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$"); > > =20 > > -#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. > > =20 > > #define EXIT_TIMEOUT 124 > > =20 > > @@ -188,7 +186,7 @@ main(int argc, char **argv) > > cpid =3D -1; > > pgid =3D -1; > > =20 > > - struct option longopts[] =3D { > > + const struct option longopts[] =3D { > I noted that this should be static const, not just const. static const is just not working here. because of the 2 first entries. >=20 > 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. Maybe because the code is sitting on code reviews for a while and that I adressed all the issue commented there regards, Bapt --ucfHZChuBC0NsER/ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlPGbp8ACgkQ8kTtMUmk6EzOxQCguluCK/YzNWe6FuUSSvkKE1pp i+EAoItNzN4eB523mI7UtpijD8u0dCLG =lQ8g -----END PGP SIGNATURE----- --ucfHZChuBC0NsER/--
文章代碼(AID): #1Jnd35On (FB_svn)
文章代碼(AID): #1Jnd35On (FB_svn)