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 <eblake@redhat.com>
+2012-07-20 Eric Blake <eblake@redhat.com>
+
+ maint.mk: forbid exit(-1)
+ * top/maint.mk (sc_prohibit_magic_number_exit): Detect negatives.
+
2012-07-20 Paul Eggert <eggert@cs.ucla.edu>
fsusage: port back to Solaris
# | 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]|\<error ?\([1-9][0-9]*,' \
- halt='use EXIT_* values rather than magic number' \
+ @prohibit='(^|[^.])\<(usage|exit|error) ?\(-?[0-9]+[,)]' \
+ exclude='error ?\(0,' \
+ halt='use EXIT_* values rather than magic number' \
$(_sc_search_regexp)
# Using EXIT_SUCCESS as the first argument to error is misleading,