Teach tzsetup to understand blank lines in the iso3166 file.

Found by:  evanc@synapse.net (Evan Champion)
This commit is contained in:
Joerg Wunsch 1997-11-07 00:07:27 +00:00
parent af0d306722
commit 8f8262da39
1 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@
#ifndef lint
static const char rcsid[] =
"$Id$";
"$Id: tzsetup.c,v 1.8 1997/10/27 07:49:47 charnier Exp $";
#endif /* not lint */
#include <sys/types.h>
@ -189,7 +189,7 @@ read_iso3166_table(void)
if (s[len - 1] != '\n')
errx(1, _PATH_ISO3166 ":%d: invalid format", lineno);
s[len - 1] = '\0';
if (s[0] == '#')
if (s[0] == '#' || strspn(s, " \t") == len - 1)
continue;
/* Isolate the two-letter code. */