summaryrefslogtreecommitdiff
path: root/src/system.h
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2010-02-07 15:06:27 +0100
committerJim Meyering <meyering@redhat.com>2010-02-07 21:08:56 +0100
commitf8a8ad71920a7406a201d02b0a0c34e3ff7a2fd7 (patch)
treeae889f7b9c1fa9062dc6e7bdf418ffae77ae4650 /src/system.h
parentb4fb8046603e4a9c32df8cf09ecdd654bc3f4c21 (diff)
downloadgrep-f8a8ad71920a7406a201d02b0a0c34e3ff7a2fd7.tar.gz
maint: enable the prohibit_magic_number_exit syntax check
* cfg.mk (local-checks-to-skip): Remove sc_prohibit_magic_number_exit, to enable that check. * src/system.h (EXIT_TROUBLE): Define. * src/grep.c: Use symbolic names, EXIT_SUCCESS, EXIT_FAILURE, and EXIT_TROUBLE, not 0, 1, 2. * src/search.c: Likewise. * src/vms_fab.c (string): Likewise.
Diffstat (limited to 'src/system.h')
-rw-r--r--src/system.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/system.h b/src/system.h
index dddb0268..93fdbf14 100644
--- a/src/system.h
+++ b/src/system.h
@@ -54,6 +54,8 @@
#include <string.h>
#include <ctype.h>
+enum { EXIT_TROUBLE = 2 };
+
/* The extra casts work around common compiler bugs. */
#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
#define TYPE_MINIMUM(t) ((t) (TYPE_SIGNED (t) \