From a837649711c5d37dea5a9517b454052ea536b958 Mon Sep 17 00:00:00 2001 From: Mikko Juola Date: Tue, 26 Mar 2024 14:54:18 -0700 Subject: [PATCH] style fix: strlen(str) == 0 --> *str == 0 --- examples/tokenize/tokenize.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/tokenize/tokenize.cpp b/examples/tokenize/tokenize.cpp index 6d5da5eb4..7d9cba8ab 100644 --- a/examples/tokenize/tokenize.cpp +++ b/examples/tokenize/tokenize.cpp @@ -149,7 +149,7 @@ static void write_utf8_cstr_to_stdout(const char * str, bool & invalid_utf8) { // MultiByteToWideChar reports an error if str is empty, don't report // them as invalid_utf8. - if (strlen(str) == 0) { + if (*str == 0) { return; } int length_needed = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, str, strlen(str), NULL, 0);