From cb07ed0e23f1b3f3f7efe547f9b60033a429a10a Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 8 Jul 2011 15:52:35 -0400 Subject: 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 --- libsandbox/libsandbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libsandbox') 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; -- cgit v1.2.3-65-gdbad