From 3215c7e3c8c39ba6a3ba3fcc54a960e5a982d9ef Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Thu, 28 Feb 2019 00:50:35 +0100 Subject: [PATCH] pdh: Remove redundant not-NULL check (coccinellery). Signed-off-by: Michael Stefaniuc Signed-off-by: Alexandre Julliard --- dlls/pdh/pdh_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/pdh/pdh_main.c b/dlls/pdh/pdh_main.c index bc3674a28a0..7ef91f1a7fb 100644 --- a/dlls/pdh/pdh_main.c +++ b/dlls/pdh/pdh_main.c @@ -898,9 +898,9 @@ PDH_STATUS WINAPI PdhLookupPerfNameByIndexA( LPCSTR machine, DWORD index, LPSTR { int required = WideCharToMultiByte( CP_ACP, 0, bufferW, -1, NULL, 0, NULL, NULL ); - if (size && *size < required) ret = PDH_MORE_DATA; + if (*size < required) ret = PDH_MORE_DATA; else WideCharToMultiByte( CP_ACP, 0, bufferW, -1, buffer, required, NULL, NULL ); - if (size) *size = required; + *size = required; } heap_free( machineW ); return ret;