aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/fstree/fstree_from_dir.c4
-rw-r--r--tar/sqfs2tar.c3
-rw-r--r--unpack/restore_fstree.c5
3 files changed, 8 insertions, 4 deletions
diff --git a/lib/fstree/fstree_from_dir.c b/lib/fstree/fstree_from_dir.c
index 9066809..a216226 100644
--- a/lib/fstree/fstree_from_dir.c
+++ b/lib/fstree/fstree_from_dir.c
@@ -22,6 +22,7 @@
static char *get_file_path(tree_node_t *n, const char *name)
{
char *ptr, *new;
+ int ret;
if (n->parent == NULL) {
ptr = strdup(name);
@@ -34,7 +35,8 @@ static char *get_file_path(tree_node_t *n, const char *name)
if (ptr == NULL)
goto fail;
- assert(canonicalize_name(ptr) == 0);
+ ret = canonicalize_name(ptr);
+ assert(ret == 0);
new = realloc(ptr, strlen(ptr) + strlen(name) + 2);
if (new == NULL)
diff --git a/tar/sqfs2tar.c b/tar/sqfs2tar.c
index 3a7d92d..a49efda 100644
--- a/tar/sqfs2tar.c
+++ b/tar/sqfs2tar.c
@@ -229,7 +229,8 @@ static int write_tree_dfs(fstree_t *fs, tree_node_t *n, data_reader_t *data)
return -1;
}
- assert(canonicalize_name(name) == 0);
+ ret = canonicalize_name(name);
+ assert(ret == 0);
if (current_subdir != NULL && !keep_as_dir) {
if (strcmp(name, current_subdir) == 0) {
diff --git a/unpack/restore_fstree.c b/unpack/restore_fstree.c
index 7fe074e..5681e0a 100644
--- a/unpack/restore_fstree.c
+++ b/unpack/restore_fstree.c
@@ -9,8 +9,8 @@
static int create_node(tree_node_t *n, int flags)
{
tree_node_t *c;
+ int fd, ret;
char *name;
- int fd;
if (!(flags & UNPACK_QUIET)) {
name = fstree_get_path(n);
@@ -82,7 +82,8 @@ static int create_node(tree_node_t *n, int flags)
return -1;
}
- assert(canonicalize_name(n->data.file->input_file) == 0);
+ ret = canonicalize_name(n->data.file->input_file);
+ assert(ret == 0);
break;
default:
break;