mirror of
https://github.com/ruby/ruby.git
synced 2025-08-24 21:44:30 +02:00
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
This commit is contained in:
parent
c943e59603
commit
d618f7b79a
3 changed files with 3 additions and 6 deletions
|
@ -386,16 +386,13 @@ date_zone_to_diff(VALUE str)
|
|||
|
||||
if (l >= (int)sizeof(STD) - 1 && strcmp(d - (sizeof(STD) - 1), STD) == 0) {
|
||||
l -= sizeof(STD) - 1;
|
||||
s[l] = '\0';
|
||||
}
|
||||
else if (l >= (int)sizeof(DST1) - 1 && strcmp(d - (sizeof(DST1) - 1), DST1) == 0) {
|
||||
l -= sizeof(DST1) - 1;
|
||||
s[l] = '\0';
|
||||
dst = 1;
|
||||
}
|
||||
else if (l >= (int)sizeof(DST2) - 1 && strcmp(d - (sizeof(DST2) - 1), DST2) == 0) {
|
||||
l -= sizeof(DST2) - 1;
|
||||
s[l] = '\0';
|
||||
dst = 1;
|
||||
}
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue