Update the comment why range checking not needed

Fix setrunelocale fail if called directly without prior setlocale
call

Should go in 2.2
This commit is contained in:
Andrey A. Chernov 1997-02-05 19:17:10 +00:00
parent 487c0bf139
commit d81a091605
3 changed files with 4 additions and 4 deletions

View File

@ -73,7 +73,7 @@ __collate_load_tables(encoding)
__collate_load_error = save_load_error;
return -1;
}
/* Range checking already done at upper level caller */
/* Range checking not needed, encoding has fixed size */
(void) strcpy(buf, _PathLocale);
(void) strcat(buf, "/");
(void) strcat(buf, encoding);

View File

@ -302,7 +302,7 @@ const char *encoding;
return(0);
if (!_PathLocale)
return(1);
/* Range checking already done at upper level caller */
/* Range checking not needed, encoding has fixed size */
strcpy(name, _PathLocale);
strcat(name, "/");
strcat(name, encoding);

View File

@ -84,8 +84,8 @@ _xpg4_setrunelocale(encoding)
}
if (!_PathLocale)
return(EFAULT);
/* Range checking already done at upper level caller */
_PathLocale = _PATH_LOCALE;
/* Range checking not needed, encoding has fixed size */
(void) strcpy(name, _PathLocale);
(void) strcat(name, "/");
(void) strcat(name, encoding);