if (stat(*argv, &sb))
if (stat(*argv, &sb)) {
main(argc, argv)	int argc;	char *argv[];{	struct stat sb;	struct timeval tv[2];	int aflag, cflag, fflag, mflag, ch, fd, len, rval, timeset;	char *p;	setlocale(LC_ALL, "");	aflag = cflag = fflag = mflag = timeset = 0;	if (gettimeofday(&tv[0], NULL))		err(1, "gettimeofday");	while ((ch = getopt(argc, argv, "acfmr:t:")) != -1)		switch(ch) {		case 'a':			aflag = 1;			break;		case 'c':			cflag = 1;			break;		case 'f':			fflag = 1;			break;		case 'm':			mflag = 1;			break;		case 'r':			timeset = 1;			stime_file(optarg, tv);			break;		case 't':			timeset = 1;			stime_arg1(optarg, tv);			break;		case '?':		default:			usage();		}	argc -= optind;	argv += optind;	/* Default is both -a and -m. */	if (aflag == 0 && mflag == 0)		aflag = mflag = 1;	/*	 * If no -r or -t flag, at least two operands, the first of which	 * is an 8 or 10 digit number, use the obsolete time specification.	 */	if (!timeset && argc > 1) {		(void)strtol(argv[0], &p, 10);		len = p - argv[0];		if (*p == '\0' && (len == 8 || len == 10)) {			timeset = 1;			stime_arg2(*argv++, len == 10, tv);		}	}	/* Otherwise use the current time of day. */	if (!timeset)		tv[1] = tv[0];	if (*argv == NULL)		usage();	for (rval = 0; *argv; ++argv) {		/* See if the file exists. */		if (stat(*argv, &sb))			if (!cflag) {				/* Create the file. */				fd = open(*argv,				    O_WRONLY | O_CREAT, DEFFILEMODE);				if (fd == -1 || fstat(fd, &sb) || close(fd)) {					rval = 1;					warn("%s", *argv);					continue;				}				/* If using the current time, we're done. */				if (!timeset)					continue;			} else				continue;		if (!aflag)			TIMESPEC_TO_TIMEVAL(&tv[0], &sb.st_atimespec);		if (!mflag)			TIMESPEC_TO_TIMEVAL(&tv[1], &sb.st_mtimespec);		/* Try utimes(2). */		if (!utimes(*argv, tv))			continue;		/* If the user specified a time, nothing else we can do. */		if (timeset) {			rval = 1;			warn("%s", *argv);		}		/*		 * System V and POSIX 1003.1 require that a NULL argument		 * set the access/modification times to the current time.		 * The permission checks are different, too, in that the		 * ability to write the file is sufficient.  Take a shot.		 */		 if (!utimes(*argv, NULL))			continue;		/* Try reading/writing. */		if (rw(*argv, &sb, fflag))			rval = 1;	}	exit(rval);}