From: Eric Blake Date: Thu, 29 Oct 2009 13:29:26 +0000 (-0600) Subject: maint: detect usage(1) and other suspicious exits X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=975243c9fb21ec51e9cc59db68626a800be78abd;p=pspp maint: detect usage(1) and other suspicious exits * top/maint.mk (sc_prohibit_magic_number_exit): New rule. Signed-off-by: Eric Blake --- diff --git a/ChangeLog b/ChangeLog index b2073ee7b1..b0c83b8a8b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-10-29 Eric Blake + + maint: detect usage(1) and other suspicious exits + * top/maint.mk (sc_prohibit_magic_number_exit): New rule. + 2009-10-29 Jim Meyering timespec: long-to-int truncation could make timespec_cmp malfunction diff --git a/top/maint.mk b/top/maint.mk index 68bd8f9153..996344a93d 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -156,6 +156,12 @@ sc_prohibit_strcmp: { echo '$(ME): use STREQ in place of the above uses of str''cmp' \ 1>&2; exit 1; } || : +# Pass EXIT_*, not number, to usage, exit, and error (when exiting) +sc_prohibit_magic_number_exit: + @re='\<(usage|exit) ?\([0-9]|\