Module: wine Branch: master Commit: 255fd46eeb3158474c9b665d6d7ff84b6f1cf55d URL: http://source.winehq.org/git/wine.git/?a=commit;h=255fd46eeb3158474c9b665d6d...
Author: Akihiro Sagawa sagawa.aki@gmail.com Date: Wed May 17 21:35:42 2017 +0900
shell32: Avoid using isspace() for WCHARs.
Found with Coccinelle.
Signed-off-by: Akihiro Sagawa sagawa.aki@gmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/shell32/shlexec.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/shell32/shlexec.c b/dlls/shell32/shlexec.c index 474a1bc..c0ef53a 100644 --- a/dlls/shell32/shlexec.c +++ b/dlls/shell32/shlexec.c @@ -62,6 +62,10 @@ static const WCHAR wszEmpty[] = {0}; typedef UINT_PTR (*SHELL_ExecuteW32)(const WCHAR *lpCmd, WCHAR *env, BOOL shWait, const SHELLEXECUTEINFOW *sei, LPSHELLEXECUTEINFOW sei_out);
+static inline BOOL isSpace(WCHAR c) +{ + return c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' || c == '\v'; +}
/*********************************************************************** * SHELL_ArgifyW [Internal] @@ -135,7 +139,7 @@ static BOOL SHELL_ArgifyW(WCHAR* out, int len, const WCHAR* fmt, const WCHAR* lp } else { - while(*args && !isspace(*args)) + while(*args && !isSpace(*args)) { used++; if (used < len) @@ -144,7 +148,7 @@ static BOOL SHELL_ArgifyW(WCHAR* out, int len, const WCHAR* fmt, const WCHAR* lp args++; }
- while(isspace(*args)) + while(isSpace(*args)) ++args; } break;