From owner-svn-src-all@freebsd.org Tue Sep 10 04:01:41 2019 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D5082EEF70; Tue, 10 Sep 2019 04:01:41 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46SBDP5N56z3Lly; Tue, 10 Sep 2019 04:01:41 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9D1732052A; Tue, 10 Sep 2019 04:01:41 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8A41fef063067; Tue, 10 Sep 2019 04:01:41 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8A41f3N063065; Tue, 10 Sep 2019 04:01:41 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201909100401.x8A41f3N063065@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 10 Sep 2019 04:01:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352115 - head/usr.bin/calendar X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/usr.bin/calendar X-SVN-Commit-Revision: 352115 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 04:01:41 -0000 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(); }