mirror of
https://github.com/intel/isa-l.git
synced 2025-10-29 12:18:00 +01:00
igzip: exit with status 1 in applications upon failure
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
This commit is contained in:
@@ -48,17 +48,17 @@ main(int argc, char *argv[])
|
||||
|
||||
if (argc != 3) {
|
||||
fprintf(stderr, "Usage: igzip_example infile outfile\n");
|
||||
exit(0);
|
||||
exit(1);
|
||||
}
|
||||
in = fopen(argv[1], "rb");
|
||||
if (!in) {
|
||||
fprintf(stderr, "Can't open %s for reading\n", argv[1]);
|
||||
exit(0);
|
||||
exit(1);
|
||||
}
|
||||
out = fopen(argv[2], "wb");
|
||||
if (!out) {
|
||||
fprintf(stderr, "Can't open %s for writing\n", argv[2]);
|
||||
exit(0);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
printf("igzip_example\nWindow Size: %d K\n", IGZIP_HIST_SIZE / 1024);
|
||||
@@ -74,7 +74,7 @@ main(int argc, char *argv[])
|
||||
stream.level_buf_size = ISAL_DEF_LVL1_DEFAULT;
|
||||
if (stream.level_buf == 0) {
|
||||
printf("Failed to allocate level compression buffer\n");
|
||||
exit(0);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user