From: Romero Malaquias Date: Wed, 9 Dec 2015 03:42:12 +0000 (-0300) Subject: Avoiding conditional directives that split up parts of statements. X-Git-Tag: v1.6.0~16^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F692%2Fhead;p=thirdparty%2Frrdtool-1.x.git Avoiding conditional directives that split up parts of statements. --- 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){