summaryrefslogtreecommitdiffstats
path: root/usr.sbin/tzsetup/tzsetup.c
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>1997-11-07 00:07:27 +0000
committerjoerg <joerg@FreeBSD.org>1997-11-07 00:07:27 +0000
commit5e073d60a331b505b00eea1284a60faf62313598 (patch)
treea4e908e410e91170efa2baabf6d131db9cb94ef2 /usr.sbin/tzsetup/tzsetup.c
parentbdb9ba6125a81bed03b655e802f132919c3027f5 (diff)
downloadFreeBSD-src-5e073d60a331b505b00eea1284a60faf62313598.zip
FreeBSD-src-5e073d60a331b505b00eea1284a60faf62313598.tar.gz
Teach tzsetup to understand blank lines in the iso3166 file.
Found by: evanc@synapse.net (Evan Champion)
Diffstat (limited to 'usr.sbin/tzsetup/tzsetup.c')
-rw-r--r--usr.sbin/tzsetup/tzsetup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/tzsetup/tzsetup.c b/usr.sbin/tzsetup/tzsetup.c
index da8d9ee..d3bd449 100644
--- a/usr.sbin/tzsetup/tzsetup.c
+++ b/usr.sbin/tzsetup/tzsetup.c
@@ -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. */
OpenPOWER on IntegriCloud