From 1e01d2dcacb5802484bbfe9b86613868a93ff312 Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Tue, 10 Sep 2019 04:01:41 +0000 Subject: [PATCH] Remove pointless playing with LC_TIME, which should have been done in r205821. --- usr.bin/calendar/day.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/usr.bin/calendar/day.c b/usr.bin/calendar/day.c index 1953c9a5bd4d..84562ccd9b30 100644 --- a/usr.bin/calendar/day.c +++ b/usr.bin/calendar/day.c @@ -50,7 +50,6 @@ int year1, year2; void settimes(time_t now, int before, int after, int friday, struct tm *tp1, struct tm *tp2) { - char *oldl, *lbufp; struct tm tp; localtime_r(&now, &tp); @@ -68,15 +67,6 @@ settimes(time_t now, int before, int after, int friday, struct tm *tp1, struct t strftime(dayname, sizeof(dayname) - 1, "%A, %d %B %Y", tp1); - oldl = NULL; - lbufp = setlocale(LC_TIME, NULL); - if (lbufp != NULL && (oldl = strdup(lbufp)) == NULL) - errx(1, "cannot allocate memory"); - (void)setlocale(LC_TIME, "C"); - (void)setlocale(LC_TIME, (oldl != NULL ? oldl : "")); - if (oldl != NULL) - free(oldl); - setnnames(); }