Commit 14187ed2 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

msvcrt: Use parameter checking macros for strtok_s.

parent 8583bd31
...@@ -152,8 +152,8 @@ char * CDECL MSVCRT_strtok( char *str, const char *delim ) ...@@ -152,8 +152,8 @@ char * CDECL MSVCRT_strtok( char *str, const char *delim )
*/ */
char * CDECL MSVCRT_strtok_s(char *str, const char *delim, char **ctx) char * CDECL MSVCRT_strtok_s(char *str, const char *delim, char **ctx)
{ {
if(!delim || !ctx || (!str && !*ctx)) { if (!MSVCRT_CHECK_PMT(delim != NULL) || !MSVCRT_CHECK_PMT(ctx != NULL) ||
MSVCRT__invalid_parameter(NULL, NULL, NULL, 0, 0); !MSVCRT_CHECK_PMT(str != NULL || *ctx != NULL)) {
*MSVCRT__errno() = MSVCRT_EINVAL; *MSVCRT__errno() = MSVCRT_EINVAL;
return NULL; return NULL;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment