Signed-off-by: Francois Gouget fgouget@free.fr ---
As in the previous patch, it seems wasteful to compute the length of the string when all we care about is the first character. Plus the 'if (*str)' pattern is pretty common and used extensively in Wine already.
Also here there is obviously no issue with the pointer being NULL.
dlls/crypt32/tests/encode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/crypt32/tests/encode.c b/dlls/crypt32/tests/encode.c index 4a6626ab006..64a45cdbbf8 100644 --- a/dlls/crypt32/tests/encode.c +++ b/dlls/crypt32/tests/encode.c @@ -1017,7 +1017,7 @@ static void compareNameValues(const CERT_NAME_VALUE *expected, static void compareRDNAttrs(const CERT_RDN_ATTR *expected, const CERT_RDN_ATTR *got) { - if (expected->pszObjId && strlen(expected->pszObjId)) + if (expected->pszObjId && *expected->pszObjId) { ok(got->pszObjId != NULL, "Expected OID %s, got NULL\n", expected->pszObjId);