svn commit: trunk/busybox/coreutils

aldot at busybox.net aldot at busybox.net
Sat Jan 20 21:32:38 UTC 2007


Author: aldot
Date: 2007-01-20 13:32:38 -0800 (Sat, 20 Jan 2007)
New Revision: 17420

Log:
- small size tweak


Modified:
   trunk/busybox/coreutils/touch.c


Changeset:
Modified: trunk/busybox/coreutils/touch.c
===================================================================
--- trunk/busybox/coreutils/touch.c	2007-01-20 21:32:20 UTC (rev 17419)
+++ trunk/busybox/coreutils/touch.c	2007-01-20 21:32:38 UTC (rev 17420)
@@ -29,11 +29,9 @@
 int touch_main(int argc, char **argv)
 {
 	int fd;
-	int flags;
 	int status = EXIT_SUCCESS;
+	bool flags = (getopt32(argc, argv, "c") & 1);
 
-	flags = getopt32(argc, argv, "c");
-
 	argv += optind;
 
 	if (!*argv) {
@@ -43,7 +41,7 @@
 	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. */




More information about the busybox-cvs mailing list