aboutsummaryrefslogtreecommitdiff
path: root/extras/browse.c
diff options
context:
space:
mode:
Diffstat (limited to 'extras/browse.c')
-rw-r--r--extras/browse.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/extras/browse.c b/extras/browse.c
index 5b27dc6..9dd735a 100644
--- a/extras/browse.c
+++ b/extras/browse.c
@@ -477,10 +477,10 @@ static const struct {
int main(int argc, char **argv)
{
char *cmd, *arg, *buffer = NULL;
+ int ret, status = EXIT_FAILURE;
sqfs_compressor_config_t cfg;
sqfs_compressor_t *cmp;
sqfs_file_t *file;
- int status = EXIT_FAILURE;
size_t i;
/* open the SquashFS file we want to read */
@@ -511,9 +511,10 @@ int main(int argc, char **argv)
super.block_size,
SQFS_COMP_FLAG_UNCOMPRESS);
- cmp = sqfs_compressor_create(&cfg);
- if (cmp == NULL) {
- fprintf(stderr, "%s: error creating compressor.\n", argv[1]);
+ ret = sqfs_compressor_create(&cfg, &cmp);
+ if (ret != 0) {
+ fprintf(stderr, "%s: error creating compressor: %d.\n",
+ argv[1], ret);
goto out_fd;
}