This allows dispol command to exit successfully after printing help messages. Signed-off-by: Masatake YAMATO <yamato@xxxxxxxxxx> --- checkpolicy/test/dispol.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/checkpolicy/test/dispol.c b/checkpolicy/test/dispol.c index d72d9fb3..1d9556f4 100644 --- a/checkpolicy/test/dispol.c +++ b/checkpolicy/test/dispol.c @@ -36,10 +36,11 @@ static policydb_t policydb; -static __attribute__((__noreturn__)) void usage(const char *progname) +static __attribute__((__noreturn__)) void usage(const char *progname, + int status) { printf("usage: %s binary_pol_file\n\n", progname); - exit(1); + exit(status); } int render_access_mask(uint32_t mask, avtab_key_t * key, policydb_t * p, @@ -395,7 +396,7 @@ int main(int argc, char **argv) struct policy_file pf; if (argc != 2) - usage(argv[0]); + usage(argv[0], 1); fd = open(argv[1], O_RDONLY); if (fd < 0) { -- 2.21.0