msvcrt: Use parameter checking macros for string to number functions.

This commit is contained in:
Eric Pouech 2010-10-29 15:39:25 +02:00 committed by Alexandre Julliard
parent 14187ed2aa
commit 1da9922ac3
1 changed files with 5 additions and 6 deletions

View File

@ -206,8 +206,7 @@ double CDECL MSVCRT_strtod_l( const char *str, char **end, MSVCRT__locale_t loca
double ret;
BOOL found_digit = FALSE;
if(!str) {
MSVCRT__invalid_parameter(NULL, NULL, NULL, 0, 0);
if (!MSVCRT_CHECK_PMT(str != NULL)) {
*MSVCRT__errno() = MSVCRT_EINVAL;
return 0;
}
@ -529,8 +528,8 @@ __int64 CDECL MSVCRT_strtoi64_l(const char *nptr, char **endptr, int base, MSVCR
TRACE("(%s %p %d %p)\n", nptr, endptr, base, locale);
if(!nptr || base<0 || base>36 || base==1) {
MSVCRT__invalid_parameter(NULL, NULL, NULL, 0, 0);
if (!MSVCRT_CHECK_PMT(nptr != NULL) || !MSVCRT_CHECK_PMT(base == 0 || base >= 2) ||
!MSVCRT_CHECK_PMT(base <= 36)) {
return 0;
}
@ -609,8 +608,8 @@ unsigned __int64 CDECL MSVCRT_strtoui64_l(const char *nptr, char **endptr, int b
TRACE("(%s %p %d %p)\n", nptr, endptr, base, locale);
if(!nptr || base<0 || base>36 || base==1) {
MSVCRT__invalid_parameter(NULL, NULL, NULL, 0, 0);
if (!MSVCRT_CHECK_PMT(nptr != NULL) || !MSVCRT_CHECK_PMT(base == 0 || base >= 2) ||
!MSVCRT_CHECK_PMT(base <= 36)) {
return 0;
}