Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Sep 2019 04:01:41 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r352115 - head/usr.bin/calendar
Message-ID:  <201909100401.x8A41f3N063065@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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();
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909100401.x8A41f3N063065>