- small size tweak
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Sat, 20 Jan 2007 21:32:38 +0000 (21:32 -0000)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Sat, 20 Jan 2007 21:32:38 +0000 (21:32 -0000)
coreutils/touch.c

index e1af7d0..72bf904 100644 (file)
 int touch_main(int argc, char **argv)
 {
        int fd;
-       int flags;
        int status = EXIT_SUCCESS;
-
-       flags = getopt32(argc, argv, "c");
+       bool flags = (getopt32(argc, argv, "c") & 1);
 
        argv += optind;
 
@@ -43,7 +41,7 @@ int touch_main(int argc, char **argv)
        do {
                if (utime(*argv, NULL)) {
                        if (errno == ENOENT) {  /* no such file*/
-                               if (flags & 1) {        /* Creation is disabled, so ignore. */
+                               if (flags) {    /* Creation is disabled, so ignore. */
                                        continue;
                                }
                                /* Try to create the file. */