From d618f7b79a7075bada3c786500769937f77d90ce Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 1 Oct 2016 08:52:43 +0000 Subject: 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 --- ext/date/date_parse.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'ext/date/date_parse.c') diff --git a/ext/date/date_parse.c b/ext/date/date_parse.c index 7a5ed723b4..08deaa049e 100644 --- a/ext/date/date_parse.c +++ b/ext/date/date_parse.c @@ -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; } { -- cgit v1.2.3