[tz] [PROPOSED_PATCH] * localtime.c (localtime_tzset): Coalesce two identical flag args.

Paul Eggert eggert at cs.ucla.edu
Tue Sep 23 14:37:36 UTC 2014


All callers changed.
---
 localtime.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/localtime.c b/localtime.c
index 30b5fbc..e692513 100644
--- a/localtime.c
+++ b/localtime.c
@@ -1389,14 +1389,14 @@ localtime_rz(struct state *sp, time_t const *timep, struct tm *tmp)
 #endif
 
 static struct tm *
-localtime_tzset(time_t const *timep, struct tm *tmp, bool settz, bool setname)
+localtime_tzset(time_t const *timep, struct tm *tmp, bool setname)
 {
   int err = lock();
   if (err) {
     errno = err;
     return NULL;
   }
-  if (settz || !lcl_is_set)
+  if (setname || !lcl_is_set)
     tzset_unlocked();
   tmp = localsub(lclptr, timep, setname, tmp);
   unlock();
@@ -1406,13 +1406,13 @@ localtime_tzset(time_t const *timep, struct tm *tmp, bool settz, bool setname)
 struct tm *
 localtime(const time_t *const timep)
 {
-  return localtime_tzset(timep, &tm, true, true);
+  return localtime_tzset(timep, &tm, true);
 }
 
 struct tm *
 localtime_r(const time_t *const timep, struct tm *tmp)
 {
-  return localtime_tzset(timep, tmp, false, false);
+  return localtime_tzset(timep, tmp, false);
 }
 
 /*
-- 
1.9.1



More information about the tz mailing list