diff --git a/usr.bin/calendar/calendar.1 b/usr.bin/calendar/calendar.1 index c397193ba45e..1ffa5e51a940 100644 --- a/usr.bin/calendar/calendar.1 +++ b/usr.bin/calendar/calendar.1 @@ -42,7 +42,7 @@ .Op Fl a .Sh DESCRIPTION .Nm Calendar -checks the $HOME directory for a file named +checks the current directory for a file named .Pa calendar and displays lines that begin with either today's date or tomorrow's. diff --git a/usr.bin/calendar/calendar.c b/usr.bin/calendar/calendar.c index deb4cfc48227..6f84a2a5f9b7 100644 --- a/usr.bin/calendar/calendar.c +++ b/usr.bin/calendar/calendar.c @@ -80,7 +80,6 @@ main(argc, argv) { extern int optind; int ch; - char *s; while ((ch = getopt(argc, argv, "-a")) != EOF) switch (ch) { @@ -111,11 +110,8 @@ main(argc, argv) cal(); (void)seteuid(0); } - else { - if ((s = getenv("HOME")) != NULL) - chdir(s); + else cal(); - } exit(0); }