=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/calendar/io.c,v retrieving revision 1.10 retrieving revision 1.12 diff -u -r1.10 -r1.12 --- src/usr.bin/calendar/io.c 2000/12/07 19:36:37 1.10 +++ src/usr.bin/calendar/io.c 2001/07/09 07:04:48 1.12 @@ -1,4 +1,4 @@ -/* $OpenBSD: io.c,v 1.10 2000/12/07 19:36:37 deraadt Exp $ */ +/* $OpenBSD: io.c,v 1.12 2001/07/09 07:04:48 deraadt Exp $ */ /* * Copyright (c) 1989, 1993, 1994 @@ -43,7 +43,7 @@ #if 0 static const char sccsid[] = "@(#)calendar.c 8.3 (Berkeley) 3/25/94"; #else -static char rcsid[] = "$OpenBSD: io.c,v 1.10 2000/12/07 19:36:37 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: io.c,v 1.12 2001/07/09 07:04:48 deraadt Exp $"; #endif #endif /* not lint */ @@ -127,7 +127,7 @@ if (spev[i].uname != NULL) free(spev[i].uname); if ((spev[i].uname = strdup(p)) == NULL) - errx(1, "cannot allocate memory"); + err(1, NULL); spev[i].ulen = strlen(p); i = NUMEV + 1; } @@ -154,7 +154,7 @@ while (m) { cur_evt = (struct event *) malloc(sizeof(struct event)); if (cur_evt == NULL) - errx(1, "cannot allocate memory"); + err(1, NULL); cur_evt->when = m->when; snprintf(cur_evt->print_date, @@ -165,7 +165,7 @@ cur_evt->ldesc = NULL; } else { if ((cur_evt->ldesc = strdup(p)) == NULL) - errx(1, "cannot allocate memory"); + err(1, NULL); cur_evt->desc = &(cur_evt->ldesc); ev1 = cur_evt; } @@ -179,7 +179,7 @@ else if (printing) { if ((ev1->ldesc = realloc(ev1->ldesc, (2 + strlen(ev1->ldesc) + strlen(buf)))) == NULL) - errx(1, "cannot allocate memory"); + err(1, NULL); strcat(ev1->ldesc, "\n"); strcat(ev1->ldesc, buf); } @@ -362,7 +362,7 @@ (void)close(pdes[0]); (void)setuid(geteuid()); (void)setgid(getegid()); - execl(_PATH_CPP, "cpp", "-P", "-I.", _PATH_INCLUDE, NULL); + execl(_PATH_CPP, "cpp", "-P", "-I.", _PATH_INCLUDE, (char *)NULL); warn(_PATH_CPP); _exit(1); } @@ -413,7 +413,7 @@ (void)setuid(geteuid()); (void)setgid(getegid()); execl(_PATH_SENDMAIL, "sendmail", "-i", "-t", "-F", - "\"Reminder Service\"", NULL); + "\"Reminder Service\"", (char *)NULL); warn(_PATH_SENDMAIL); _exit(1); }