Remove pointless playing with LC_TIME, which should have been done in r205821.

This commit is contained in:
glebius 2019-09-10 04:01:41 +00:00
parent 08e679900d
commit 259fac9439

View File

@ -50,7 +50,6 @@ int year1, year2;
void void
settimes(time_t now, int before, int after, int friday, struct tm *tp1, struct tm *tp2) settimes(time_t now, int before, int after, int friday, struct tm *tp1, struct tm *tp2)
{ {
char *oldl, *lbufp;
struct tm tp; struct tm tp;
localtime_r(&now, &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); 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(); setnnames();
} }