]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(main): int -> bool when appropriate.
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 28 Jul 2004 23:37:21 +0000 (23:37 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 28 Jul 2004 23:37:21 +0000 (23:37 +0000)
src/chown.c

index 47a8e95f3f4eff9571890ae515cf47eeec9f0dff..9179ac9147ea73f21344e87834f7bb628eaacaa0 100644 (file)
@@ -175,7 +175,7 @@ main (int argc, char **argv)
   int dereference = -1;
 
   struct Chown_option chopt;
-  int fail;
+  bool ok;
   int optc;
 
   initialize_main (&argc, &argv);
@@ -320,7 +320,7 @@ main (int argc, char **argv)
       optind++;
     }
 
-  if (chopt.recurse && preserve_root)
+  if (chopt.recurse & preserve_root)
     {
       static struct dev_ino dev_ino_buf;
       chopt.root_dev_ino = get_root_dev_ino (&dev_ino_buf);
@@ -329,11 +329,11 @@ main (int argc, char **argv)
               quote ("/"));
     }
 
-  fail = chown_files (argv + optind, bit_flags,
-                     uid, gid,
-                     required_uid, required_gid, &chopt);
+  ok = chown_files (argv + optind, bit_flags,
+                   uid, gid,
+                   required_uid, required_gid, &chopt);
 
   chopt_free (&chopt);
 
-  exit (fail ? EXIT_FAILURE : EXIT_SUCCESS);
+  exit (ok ? EXIT_SUCCESS : EXIT_FAILURE);
 }