From bf1dd4f1ab8ef70f96704c4e2bd95968e1615b37 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sun, 4 Aug 2019 01:18:27 +0200 Subject: 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 --- tar/sqfs2tar.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tar') 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) { -- cgit v1.2.3