[PATCH] cryptui: Avoid an unneeded strlen() call.
--- There is obviously no issue with str being NULL (plus in the two call places right now this parameter cannot actually be NULL). dlls/cryptui/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/cryptui/main.c b/dlls/cryptui/main.c index a1004192cf6..41938f5177b 100644 --- a/dlls/cryptui/main.c +++ b/dlls/cryptui/main.c @@ -3497,7 +3497,7 @@ static void set_general_cert_properties(HWND hwnd, struct edit_cert_data *data) static void set_cert_string_property(PCCERT_CONTEXT cert, DWORD prop, LPWSTR str) { - if (str && strlenW(str)) + if (str && *str) { CRYPT_DATA_BLOB blob; -- 2.19.2
Signed-off-by: Francois Gouget <fgouget(a)free.fr> --- Sorry. With signed-off-by this time. dlls/cryptui/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/cryptui/main.c b/dlls/cryptui/main.c index a1004192cf6..41938f5177b 100644 --- a/dlls/cryptui/main.c +++ b/dlls/cryptui/main.c @@ -3497,7 +3497,7 @@ static void set_general_cert_properties(HWND hwnd, struct edit_cert_data *data) static void set_cert_string_property(PCCERT_CONTEXT cert, DWORD prop, LPWSTR str) { - if (str && strlenW(str)) + if (str && *str) { CRYPT_DATA_BLOB blob; -- 2.19.2
participants (1)
-
Francois Gouget