msvcrt: Use parameter checking macros for wcsto{number} functions.

This commit is contained in:
Eric Pouech 2010-10-29 15:39:30 +02:00 committed by Alexandre Julliard
parent 1da9922ac3
commit 16c89a543a
1 changed files with 7 additions and 6 deletions

View File

@ -135,8 +135,7 @@ double CDECL MSVCRT__wcstod_l(const MSVCRT_wchar_t* str, MSVCRT_wchar_t** end,
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;
}
@ -1642,8 +1641,9 @@ __int64 CDECL MSVCRT__wcstoi64_l(const MSVCRT_wchar_t *nptr,
TRACE("(%s %p %d %p)\n", debugstr_w(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)) {
*MSVCRT__errno() = MSVCRT_EINVAL;
return 0;
}
@ -1724,8 +1724,9 @@ unsigned __int64 CDECL MSVCRT__wcstoui64_l(const MSVCRT_wchar_t *nptr,
TRACE("(%s %p %d %p)\n", debugstr_w(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)) {
*MSVCRT__errno() = MSVCRT_EINVAL;
return 0;
}