Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc5054da

Browse files
committed
Sync our copy of the timezone library with IANA release tzcode2020d.
There's no functional change at all here, but I'm curious to seewhether this change successfully shuts up Coverity's warning abouta useless strcmp(), which appeared with the previous update.Discussion:http://mm.icann.org/pipermail/tz/2020-October/029370.html
1 parentc16a1bb commitc5054da

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

‎src/timezone/README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ match properly on the old version.
5555
Time Zone code
5656
==============
5757

58-
The code in this directory is currently synced with tzcode release2020c.
58+
The code in this directory is currently synced with tzcode release2020d.
5959
There are many cosmetic (and not so cosmetic) differences from the
6060
original tzcode library, but diffs in the upstream version should usually
6161
be propagated to our version. Here are some notes about that.

‎src/timezone/zic.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,8 @@ static const char *leapsec;
634634
staticconstchar*tzdefault;
635635

636636
/* -1 if the TZif output file should be slim, 0 if default, 1 if the
637-
output should be fat for backward compatibility. The default is slim. */
637+
output should be fat for backward compatibility. ZIC_BLOAT_DEFAULT
638+
determines the default. */
638639
staticintbloat;
639640

640641
staticbool
@@ -787,7 +788,16 @@ main(int argc, char **argv)
787788
if (optind==argc-1&&strcmp(argv[optind],"=")==0)
788789
usage(stderr,EXIT_FAILURE);/* usage message by request */
789790
if (bloat==0)
790-
bloat=strcmp(ZIC_BLOAT_DEFAULT,"slim")==0 ?-1 :1;
791+
{
792+
staticcharconstbloat_default[]=ZIC_BLOAT_DEFAULT;
793+
794+
if (strcmp(bloat_default,"slim")==0)
795+
bloat=-1;
796+
elseif (strcmp(bloat_default,"fat")==0)
797+
bloat=1;
798+
else
799+
abort();/* Configuration error. */
800+
}
791801
if (directory==NULL)
792802
directory="data";
793803
if (tzdefault==NULL)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp