From 1c29cb82aa783292913bc04a92e1866c18e83c90 Mon Sep 17 00:00:00 2001 From: Romero Malaquias Date: Wed, 9 Dec 2015 00:42:12 -0300 Subject: [PATCH] Avoiding conditional directives that split up parts of statements. --- src/rrd_tool.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/rrd_tool.c b/src/rrd_tool.c index 3e81ce28..432db7b4 100644 --- a/src/rrd_tool.c +++ b/src/rrd_tool.c @@ -465,14 +465,11 @@ int main( #endif RemoteMode = 1; if ((argc == 3) && strcmp("", argv[2])) { - - if ( + int test_euid = 0; #ifdef HAVE_GETEUID - geteuid() -#else - 1 + test_euid = geteuid() == 0; #endif - == 0) { + if (test_euid) { #ifdef HAVE_CHROOT if (chroot(argv[2]) != 0){ -- 2.47.2