summaryrefslogtreecommitdiff
path: root/ext/date/zonetab.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-10-01 08:52:43 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-10-01 08:52:43 +0000
commitd618f7b79a7075bada3c786500769937f77d90ce (patch)
treed088bc5a9770ce8a49b6ac8350798050dd8c510a /ext/date/zonetab.h
parentc943e59603ca644ec44b1e861e12cc41db5d7ea7 (diff)
zonetab.h: use strncmp
* ext/date/zonetab.h (zonetab): use strncmp. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/date/zonetab.h')
-rw-r--r--ext/date/zonetab.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/date/zonetab.h b/ext/date/zonetab.h
index 1497eb5..fa86e79 100644
--- a/ext/date/zonetab.h
+++ b/ext/date/zonetab.h
@@ -1,5 +1,5 @@
/* C code produced by gperf version 3.0.4 */
-/* Command-line: gperf -E -C -P -p -j1 -i 1 -g -o -t -N zonetab zonetab.list */
+/* Command-line: gperf -E -C -c -P -p -j1 -i 1 -g -o -t -N zonetab zonetab.list */
/* Computed positions: -k'1-4,$' */
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
@@ -891,7 +891,7 @@ zonetab (str, len)
{
register const char *s = o + stringpool;
- if (*str == *s && !strcmp (str + 1, s + 1))
+ if (*str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] == '\0')
return &wordlist[key];
}
}