Author: glebius
Date: Tue Sep 10 04:01:41 2019
New Revision: 352115
URL: https://svnweb.freebsd.org/changeset/base/352115

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

Modified:
  head/usr.bin/calendar/day.c

Modified: head/usr.bin/calendar/day.c
==============================================================================
--- head/usr.bin/calendar/day.c Tue Sep 10 02:21:17 2019        (r352114)
+++ head/usr.bin/calendar/day.c Tue Sep 10 04:01:41 2019        (r352115)
@@ -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);
@@ -67,15 +66,6 @@ settimes(time_t now, int before, int after, int friday
        year2 = 1900 + tp2->tm_year;
 
        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();
 }
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to