From 92875a6a65e0dbb960d2b0704f6240d4a6e25936 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Fri, 20 Jul 2012 15:29:22 -0600 Subject: [PATCH] maint.mk: forbid exit(-1) Libvirt accidentally had an 'exit (-1)' which got by the syntax checker; generally, exiting with 255 is not a wise idea. * top/maint.mk (sc_prohibit_magic_number_exit): Detect negatives. Signed-off-by: Eric Blake --- ChangeLog | 5 +++++ top/maint.mk | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8f760523c..2fa6fd5e2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-07-20 Eric Blake + + maint.mk: forbid exit(-1) + * top/maint.mk (sc_prohibit_magic_number_exit): Detect negatives. + 2012-07-20 Paul Eggert fsusage: port back to Solaris diff --git a/top/maint.mk b/top/maint.mk index d5af75073..b39e9ae5a 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -353,8 +353,9 @@ sc_prohibit_strncpy: # | xargs --no-run-if-empty \ # perl -pi -e 's/(^|[^.])\b(exit ?)\(0\)/$1$2(EXIT_SUCCESS)/' sc_prohibit_magic_number_exit: - @prohibit='(^|[^.])\<(usage|exit) ?\([0-9]|\