summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-11-20 12:18:06 +0100
committerRichard Jones <rjones@redhat.com>2009-11-20 12:14:32 +0000
commita84dee0f8df3c5d6ef3ecd5423f6bed3086419ac (patch)
treedf3276d884462300a8aca655f86f2d329cce4b51
parent4d45c45f0928c7791429d351dc69b75167888f7d (diff)
downloadlibguestfs-a84dee0f8df3c5d6ef3ecd5423f6bed3086419ac.tar.gz
libguestfs-a84dee0f8df3c5d6ef3ecd5423f6bed3086419ac.tar.xz
libguestfs-a84dee0f8df3c5d6ef3ecd5423f6bed3086419ac.zip
maint: use EXIT_* symbol (not constant, 2) to indicate key/path not found
* hivex/hivexget.c (EXIT_NOT_FOUND): Define. (main): Use exit (EXIT_NOT_FOUND), not "exit (2)".
-rw-r--r--hivex/hivexget.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hivex/hivexget.c b/hivex/hivexget.c
index 8cc395a1..3e89d632 100644
--- a/hivex/hivexget.c
+++ b/hivex/hivexget.c
@@ -27,6 +27,8 @@
#include "hivex.h"
+enum { EXIT_NOT_FOUND = 2 };
+
int
main (int argc, char *argv[])
{
@@ -82,7 +84,7 @@ main (int argc, char *argv[])
/* else node not found */
fprintf (stderr, "hivexget: %s: %s: path element not found\n",
path, p);
- exit (2);
+ exit (EXIT_NOT_FOUND);
}
p = pnext;
@@ -103,7 +105,7 @@ main (int argc, char *argv[])
goto error;
/* else key not found */
fprintf (stderr, "hivexget: %s: key not found\n", key);
- exit (2);
+ exit (EXIT_NOT_FOUND);
}
/* Print the value. */