[PATCH] shell32: arrays are never NULL (Coverity)

Marcus Meissner meissner at suse.de
Mon Mar 14 20:13:54 CDT 2011


Hi,

Comparing arrays against NULL is not necessary.
CID 1724

Ciao, Marcus
---
 dlls/shell32/control.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/shell32/control.c b/dlls/shell32/control.c
index 3be0494..ffe96ff 100644
--- a/dlls/shell32/control.c
+++ b/dlls/shell32/control.c
@@ -129,13 +129,13 @@ CPlApplet*	Control_LoadApplet(HWND hWnd, LPCWSTR cmd, CPanel* panel)
           but proper data in CPL_NEWINQUIRE. if we get an empty string or a null
           icon, see what we can get from CPL_NEWINQUIRE */
 
-       if ((applet->info[i].szName == 0) || (lstrlenW(applet->info[i].szName) == 0))
+       if (lstrlenW(applet->info[i].szName) == 0)
            info.idName = CPL_DYNAMIC_RES;
 
        /* zero-length szInfo may not be a buggy applet, but it doesn't hurt for us
           to check anyway */
 
-       if ((applet->info[i].szInfo == 0) || (lstrlenW(applet->info[i].szInfo) == 0))
+       if (lstrlenW(applet->info[i].szInfo) == 0)
            info.idInfo = CPL_DYNAMIC_RES;
 
        if (applet->info[i].hIcon == NULL)
-- 
1.7.1



More information about the wine-patches mailing list