aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2009-11-13 22:29:01 +0000
committerRoy Marples <roy@marples.name>2009-11-13 22:29:01 +0000
commit0de1d18d41950dc36a0c38ff5bf0ef0fc5c73801 (patch)
tree2349d7033675117855bc6539d209f77dcffc8d72
parent89a2d76772ae889068316c8a47df4ee13bac09f1 (diff)
Fix logic
-rw-r--r--src/rc/swclock.c9
1 files changed, 4 insertions, 5 deletions
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;