diff options
-rw-r--r-- | src/faketime.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/faketime.c b/src/faketime.c index 04302ce..a180f8f 100644 --- a/src/faketime.c +++ b/src/faketime.c @@ -154,13 +154,13 @@ int main (int argc, char **argv) if (!use_direct) { // TODO get seconds - (void) pipe(pfds); + (void) (pipe(pfds) + 1); int ret = EXIT_SUCCESS; if (0 == (child_pid = fork())) { close(1); /* close normal stdout */ - (void) dup(pfds[1]); /* make stdout same as pfds[1] */ + (void) (dup(pfds[1]) + 1); /* make stdout same as pfds[1] */ close(pfds[0]); /* we don't need this */ if (EXIT_SUCCESS != execlp(date_cmd, date_cmd, "-d", argv[curr_opt], "+%s",(char *) NULL)) { @@ -172,7 +172,7 @@ int main (int argc, char **argv) { char buf[256] = {0}; /* e will have way less than 256 digits */ close(pfds[1]); /* we won't write to this */ - (void) read(pfds[0], buf, 256); + (void) (read(pfds[0], buf, 256) + 1); waitpid(child_pid, &ret, 0); if (ret != EXIT_SUCCESS) { |