]> Savannah Git Hosting - gnulib.git/commitdiff
maint.mk: teach sc_prohibit_magic_number_exit to accept 77
authorJim Meyering <meyering@redhat.com>
Mon, 17 Sep 2012 09:34:44 +0000 (11:34 +0200)
committerJim Meyering <meyering@redhat.com>
Tue, 18 Sep 2012 06:51:34 +0000 (08:51 +0200)
* top/maint.mk (sc_prohibit_magic_number_exit): Do not complain about
uses like "exit (77)".  "77" is automake's "skip this test" exit code.
It is not in the same category as "exit (0)" or "exit (1)", and
besides, I know of no symbolic name for that 77.  Reported by
Richard W.M. Jones in
http://thread.gmane.org/gmane.comp.emulators.guestfs/1902

ChangeLog
top/maint.mk

index 1279ad3507f2236e7dba383a83c4f4470d937fb4..ce15e28c3cb5fdec974d4f3504e51a483ec8b52a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2012-09-17  Jim Meyering  <meyering@redhat.com>
+
+       maint.mk: teach sc_prohibit_magic_number_exit to accept 77
+       * top/maint.mk (sc_prohibit_magic_number_exit): Do not complain about
+       uses like "exit (77)".  "77" is automake's "skip this test" exit code.
+       It is not in the same category as "exit (0)" or "exit (1)", and
+       besides, I know of no symbolic name for that 77.  Reported by
+       Richard W.M. Jones in
+       http://thread.gmane.org/gmane.comp.emulators.guestfs/1902
+
 2012-09-17  Jim Meyering  <meyering@redhat.com>
 
        maint.mk: relax sc_prohibit_strcmp, to avoid a false positive
index 09f55c50971f4dda30772c3eeee58cb649836532..9c660a14bef00e15e56e389e44ed17074ce5ce16 100644 (file)
@@ -354,7 +354,7 @@ sc_prohibit_strncpy:
 #      perl -pi -e 's/(^|[^.])\b(exit ?)\(0\)/$1$2(EXIT_SUCCESS)/'
 sc_prohibit_magic_number_exit:
        @prohibit='(^|[^.])\<(usage|exit|error) ?\(-?[0-9]+[,)]'        \
-       exclude='error ?\((0,|[^,]*)'                                   \
+       exclude='exit \(77\)|error ?\(((0|77),|[^,]*)'                  \
        halt='use EXIT_* values rather than magic number'               \
          $(_sc_search_regexp)