aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncaen <mail@duncano.de>2017-05-19 19:01:22 +0200
committerDuncaen <mail@duncano.de>2017-05-19 19:01:22 +0200
commit5854201b0535098c402eb346e3705349dd166fe2 (patch)
tree7e08a9ef22415c7e3841185bf16814ec3e8d74f1
parent6a0767c4ef63d3efa6e106c774b29b9d31666eda (diff)
downloadlobase-5854201b0535098c402eb346e3705349dd166fe2.tar.gz
usr.bin/calendar: update to OPENBSD_6_1
-rw-r--r--usr.bin/calendar/day.c6
-rw-r--r--usr.bin/calendar/io.c7
2 files changed, 9 insertions, 4 deletions
diff --git a/usr.bin/calendar/day.c b/usr.bin/calendar/day.c
index 7e8da77..a34e785 100644
--- a/usr.bin/calendar/day.c
+++ b/usr.bin/calendar/day.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: day.c,v 1.33 2016/07/13 21:32:01 millert Exp $ */
+/* $OpenBSD: day.c,v 1.34 2016/09/14 15:09:46 millert Exp $ */
/*
* Copyright (c) 1989, 1993, 1994
@@ -543,7 +543,9 @@ isnow(char *endp, int bodun)
tdiff = difftime(ttmp, f_time)/ SECSPERDAY;
if (tdiff <= offset + f_dayAfter ||
(bodun && tdiff == -1)) {
- if ((tmtmp.tm_mon == month) &&
+ if (((tmtmp.tm_mon == month) ||
+ (flags & F_SPECIAL) ||
+ (interval == WEEKLY)) &&
(tdiff >= 0 ||
(bodun && tdiff == -1))) {
if ((tmp = malloc(sizeof(struct match))) == NULL)
diff --git a/usr.bin/calendar/io.c b/usr.bin/calendar/io.c
index f17cacb..e4cb689 100644
--- a/usr.bin/calendar/io.c
+++ b/usr.bin/calendar/io.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: io.c,v 1.43 2015/12/08 19:04:50 mmcc Exp $ */
+/* $OpenBSD: io.c,v 1.44 2016/08/31 09:38:47 jsg Exp $ */
/*
* Copyright (c) 1989, 1993, 1994
@@ -335,12 +335,15 @@ opencal(void)
}
}
- if (pipe(pdes) < 0)
+ if (pipe(pdes) < 0) {
+ close(fdin);
return (NULL);
+ }
switch (vfork()) {
case -1: /* error */
(void)close(pdes[0]);
(void)close(pdes[1]);
+ close(fdin);
return (NULL);
case 0:
dup2(fdin, STDIN_FILENO);