aboutsummaryrefslogtreecommitdiff
path: root/tar
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-08-04 01:18:27 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-08-04 01:18:27 +0200
commitbf1dd4f1ab8ef70f96704c4e2bd95968e1615b37 (patch)
tree807ca034531c8470c5128642be118352dbbf8775 /tar
parent85e2e1629ba43ea2b2a11b1f81e3538e3cea64da (diff)
Fix functions with side effect being used inside asserts
If -DNDEBUG is set, the entire thing is omitted from the output. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'tar')
-rw-r--r--tar/sqfs2tar.c3
1 files changed, 2 insertions, 1 deletions
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) {