]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
Avoiding conditional directives that split up parts of statements. 692/head
authorRomero Malaquias <romero.malaquias@gmail.com>
Wed, 9 Dec 2015 03:42:12 +0000 (00:42 -0300)
committerRomero Malaquias <romero.malaquias@gmail.com>
Wed, 9 Dec 2015 03:42:12 +0000 (00:42 -0300)
src/rrd_tool.c

index 3e81ce28339f3aed241a56f84fd26c7277baded6..432db7b4d995200a2cc126b20f6140e013123e45 100644 (file)
@@ -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){