aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-07-08 15:52:35 -0400
committerMike Frysinger <vapier@gentoo.org>2011-07-08 15:52:35 -0400
commitcb07ed0e23f1b3f3f7efe547f9b60033a429a10a (patch)
treeb1355cd99ff8f323033e87e5a1a35b41e168592c /libsandbox
parenttests: disable non-POSIX EBADFD (diff)
downloadsandbox-cb07ed0e23f1b3f3f7efe547f9b60033a429a10a.tar.gz
sandbox-cb07ed0e23f1b3f3f7efe547f9b60033a429a10a.tar.bz2
sandbox-cb07ed0e23f1b3f3f7efe547f9b60033a429a10a.zip
libsandbox: invert debug checking order to avoid uninitialized variables
We only initialize debug_log_path if debug is set, so we need to check debug first to avoid uninitialized warnings with debug_log_path. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'libsandbox')
-rw-r--r--libsandbox/libsandbox.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libsandbox/libsandbox.c b/libsandbox/libsandbox.c
index 84191d9..0fcbb65 100644
--- a/libsandbox/libsandbox.c
+++ b/libsandbox/libsandbox.c
@@ -990,7 +990,7 @@ static int check_syscall(sbcontext_t *sbcontext, int sb_nr, const char *func,
goto error;
}
- if (debug_log_path && debug) {
+ if (debug && debug_log_path) {
bool worked = write_logfile(debug_log_path, func, file, absolute_path, resolved_path, access);
if (!worked && errno)
goto error;