1
0
mirror of https://frontier.innolan.net/rainlance/amiga-tz.git synced 2025-11-23 06:20:09 +00:00

zdump: don't use uninitialized storage

* zdump.c (main): Avoid use of uninitalized locals in rare cases.
* NEWS: Mention this.
This commit is contained in:
Paul Eggert
2014-08-23 18:10:54 -07:00
parent d0aac72175
commit ab1034cab1
2 changed files with 5 additions and 3 deletions

View File

@ -420,8 +420,11 @@ _("%s: usage: %s [--version] [--help] [-{vV}] [-{ct} [lo,]hi] zonename ...\n"
int
main(int argc, char *argv[])
{
/* These are static so that they're initially zero. */
static char * abbrev;
static size_t abbrevsize;
static struct tm newtm;
register int i;
register bool vflag;
register bool Vflag;
@ -433,7 +436,6 @@ main(int argc, char *argv[])
time_t t;
time_t newt;
struct tm tm;
struct tm newtm;
register struct tm * tmp;
register struct tm * newtmp;