Mesa (master): aubinator: be consistent on exit code
Lionel Landwerlin
llandwerlin at kemper.freedesktop.org
Wed May 24 09:54:08 UTC 2017
Module: Mesa
Branch: master
Commit: 8f1f1d294d47aa16ee4cc9e06a85900c951ac7a6
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8f1f1d294d47aa16ee4cc9e06a85900c951ac7a6
Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date: Wed May 24 02:02:30 2017 +0100
aubinator: be consistent on exit code
We're using both exit(1) & exit(EXIT_FAILURE), settle for one, same
for success.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>
---
src/intel/tools/aubinator_error_decode.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/intel/tools/aubinator_error_decode.c b/src/intel/tools/aubinator_error_decode.c
index 506d39012b..a41292238c 100644
--- a/src/intel/tools/aubinator_error_decode.c
+++ b/src/intel/tools/aubinator_error_decode.c
@@ -587,7 +587,7 @@ read_data_file(FILE *file)
count = ascii85_decode(line+1, &data, line[0] == ':');
if (count == 0) {
fprintf(stderr, "ASCII85 decode failed.\n");
- exit(1);
+ exit(EXIT_FAILURE);
}
if (strcmp(buffer_name, "user") == 0) {
@@ -718,7 +718,7 @@ read_data_file(FILE *file)
data = realloc(data, data_size * sizeof (uint32_t));
if (data == NULL) {
fprintf(stderr, "Out of memory.\n");
- exit(1);
+ exit(EXIT_FAILURE);
}
}
@@ -824,7 +824,7 @@ main(int argc, char *argv[])
if (help || argc == 1) {
print_help(argv[0], stderr);
- exit(0);
+ exit(EXIT_SUCCESS);
}
if (optind >= argc) {
@@ -847,7 +847,7 @@ main(int argc, char *argv[])
}
} else {
read_data_file(stdin);
- exit(0);
+ exit(EXIT_SUCCESS);
}
} else {
path = argv[optind];
@@ -855,7 +855,7 @@ main(int argc, char *argv[])
if (error != 0) {
fprintf(stderr, "Error opening %s: %s\n",
path, strerror(errno));
- exit(1);
+ exit(EXIT_FAILURE);
}
}
More information about the mesa-commit
mailing list