summaryrefslogtreecommitdiff
path: root/tz/zdump.c
diff options
context:
space:
mode:
Diffstat (limited to 'tz/zdump.c')
-rw-r--r--tz/zdump.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/tz/zdump.c b/tz/zdump.c
index 8b6788a..a63a343 100644
--- a/tz/zdump.c
+++ b/tz/zdump.c
@@ -35,11 +35,11 @@
#endif
#ifndef ZDUMP_LO_YEAR
-#define ZDUMP_LO_YEAR (-500)
+# define ZDUMP_LO_YEAR (-500)
#endif /* !defined ZDUMP_LO_YEAR */
#ifndef ZDUMP_HI_YEAR
-#define ZDUMP_HI_YEAR 2500
+# define ZDUMP_HI_YEAR 2500
#endif /* !defined ZDUMP_HI_YEAR */
#define SECSPERNYEAR (SECSPERDAY * DAYSPERNYEAR)
@@ -72,7 +72,7 @@ enum { SECSPER400YEARS_FITS = SECSPERLYEAR <= INTMAX_MAX / 400 };
#endif
#if HAVE_GETTEXT
-#include <locale.h> /* for setlocale */
+# include <locale.h> /* for setlocale */
#endif /* HAVE_GETTEXT */
#if ! HAVE_LOCALTIME_RZ
@@ -450,9 +450,9 @@ main(int argc, char *argv[])
cuthitime = absolute_max_time;
#if HAVE_GETTEXT
setlocale(LC_ALL, "");
-#ifdef TZ_DOMAINDIR
+# ifdef TZ_DOMAINDIR
bindtextdomain(TZ_DOMAIN, TZ_DOMAINDIR);
-#endif /* defined TEXTDOMAINDIR */
+# endif /* defined TEXTDOMAINDIR */
textdomain(TZ_DOMAIN);
#endif /* HAVE_GETTEXT */
progname = argv[0];
@@ -548,7 +548,7 @@ main(int argc, char *argv[])
for (i = optind; i < argc; i++) {
size_t arglen = strlen(argv[i]);
if (longest < arglen)
- longest = arglen < INT_MAX ? arglen : INT_MAX;
+ longest = min(arglen, INT_MAX);
}
for (i = optind; i < argc; ++i) {
@@ -1193,6 +1193,7 @@ dumptime(register const struct tm *timeptr)
};
register int lead;
register int trail;
+ int DIVISOR = 10;
/*
** The packaged localtime_rz and gmtime_r never put out-of-range
@@ -1208,7 +1209,6 @@ dumptime(register const struct tm *timeptr)
? mon_name[timeptr->tm_mon] : "???"),
timeptr->tm_mday, timeptr->tm_hour,
timeptr->tm_min, timeptr->tm_sec);
-#define DIVISOR 10
trail = timeptr->tm_year % DIVISOR + TM_YEAR_BASE % DIVISOR;
lead = timeptr->tm_year / DIVISOR + TM_YEAR_BASE / DIVISOR +
trail / DIVISOR;