Skip to content

Commit 2d2ec71

Browse files
author
Artyom Abakumov
committed
Change input type from int to uint if possible
1 parent 65d1c7a commit 2d2ec71

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/common/CvtFormat.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,12 @@ namespace
7070
}
7171
}
7272

73-
bool contains(const char* value, USHORT& outTimezoneId, int& outParsedTimezoneLength)
73+
bool contains(const char* value, USHORT& outTimezoneId, FB_SIZE_T& outParsedTimezoneLength)
7474
{
7575
const TrieNode* currentNode = m_root;
7676
FB_SIZE_T valueLength = fb_strlen(value);
7777

78-
for (outParsedTimezoneLength = 0; static_cast<FB_SIZE_T>(outParsedTimezoneLength) < valueLength; outParsedTimezoneLength++)
78+
for (outParsedTimezoneLength = 0; outParsedTimezoneLength < valueLength; outParsedTimezoneLength++)
7979
{
8080
int index = calculateIndex(value[outParsedTimezoneLength]);
8181

@@ -1541,7 +1541,7 @@ namespace
15411541
}
15421542
case Format::TZR:
15431543
{
1544-
int parsedTimezoneNameLength = 0;
1544+
FB_SIZE_T parsedTimezoneNameLength = 0;
15451545
const bool timezoneNameIsCorrect = timeZoneTrie().contains(str + strOffset, outTimezoneId, parsedTimezoneNameLength);
15461546
if (!timezoneNameIsCorrect)
15471547
status_exception::raise(Arg::Gds(isc_invalid_timezone_region) << string(str + strOffset, parsedTimezoneNameLength));

0 commit comments

Comments
 (0)