mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
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)".
This commit is contained in:
committed by
Richard Jones
parent
4d45c45f09
commit
a84dee0f8d
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user