From 0de1d18d41950dc36a0c38ff5bf0ef0fc5c73801 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Fri, 13 Nov 2009 22:29:01 +0000 Subject: Fix logic --- src/rc/swclock.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/rc/swclock.c b/src/rc/swclock.c index e4e0068a..f972829a 100644 --- a/src/rc/swclock.c +++ b/src/rc/swclock.c @@ -72,7 +72,6 @@ swclock(int argc, char **argv) const char *file = RC_SHUTDOWNTIME; struct stat sb; struct timeval tv; - void (*e)(const char * __EINFO_RESTRICT, ...) EINFO_XPRINTF(1, 2); while ((opt = getopt_long(argc, argv, getoptstring, longopts, (int *) 0)) != -1) @@ -104,11 +103,11 @@ swclock(int argc, char **argv) } if (stat(file, &sb) == -1) { - if (wflag != 0 && errno == EEXIST) - e = ewarnx; + if (wflag != 0 && errno == ENOENT) + ewarn("swclock: `%s': %s", file, strerror(errno)); else - e = eerrorx; - e("swclock: `%s': %s", file, strerror(errno)); + eerrorx("swclock: `%s': %s", file, strerror(errno)); + return 0; } tv.tv_sec = sb.st_mtime; -- cgit v1.2.3