mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 23:10:40 +00:00
ICU-11746 static analysis fixes
X-SVN-Rev: 39282
This commit is contained in:
parent
dd65e19e36
commit
a2ee3b1f28
3 changed files with 3 additions and 2 deletions
|
@ -664,6 +664,7 @@ Locale::setToBogus() {
|
|||
*script = 0;
|
||||
*country = 0;
|
||||
fIsBogus = TRUE;
|
||||
variantBegin = 0;
|
||||
}
|
||||
|
||||
const Locale& U_EXPORT2
|
||||
|
|
|
@ -1030,7 +1030,7 @@ uprv_tzname(int n)
|
|||
because the tzfile contents is underspecified.
|
||||
This isn't guaranteed to work because it may not be a symlink.
|
||||
*/
|
||||
int32_t ret = (int32_t)readlink(TZDEFAULT, gTimeZoneBuffer, sizeof(gTimeZoneBuffer));
|
||||
int32_t ret = (int32_t)readlink(TZDEFAULT, gTimeZoneBuffer, sizeof(gTimeZoneBuffer)-1);
|
||||
if (0 < ret) {
|
||||
int32_t tzZoneInfoLen = uprv_strlen(TZZONEINFO);
|
||||
gTimeZoneBuffer[ret] = 0;
|
||||
|
|
|
@ -1822,7 +1822,7 @@ TZDBNames::createInstance(UResourceBundle* rb, const char* key) {
|
|||
if (regions != NULL) {
|
||||
char **p = regions;
|
||||
for (int32_t i = 0; i < numRegions; p++, i++) {
|
||||
uprv_free(p);
|
||||
uprv_free(*p);
|
||||
}
|
||||
uprv_free(regions);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue