Aric Stewart : user32/tests: GetMenuItemCount returns INT so check for -1 ( Coverity 542).

Alexandre Julliard julliard at winehq.org
Thu Oct 2 11:37:22 CDT 2008


Module: wine
Branch: master
Commit: a7e48d7d98e3cd7cb777b6b427bb3fb0cae8b88f
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a7e48d7d98e3cd7cb777b6b427bb3fb0cae8b88f

Author: Aric Stewart <aric at codeweavers.com>
Date:   Thu Oct  2 07:52:55 2008 -0500

user32/tests: GetMenuItemCount returns INT so check for -1 (Coverity 542).

---

 dlls/user32/tests/menu.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/user32/tests/menu.c b/dlls/user32/tests/menu.c
index 6c60335..e4c4cea 100644
--- a/dlls/user32/tests/menu.c
+++ b/dlls/user32/tests/menu.c
@@ -2005,9 +2005,10 @@ static void test_menu_hilitemenuitem( void )
 static void check_menu_items(HMENU hmenu, UINT checked_cmd, UINT checked_type,
                              UINT checked_state)
 {
-    UINT i, count;
+    INT i, count;
 
     count = GetMenuItemCount(hmenu);
+    ok (count != -1, "GetMenuItemCount returned -1\n");
 
     for (i = 0; i < count; i++)
     {




More information about the wine-cvs mailing list