Skip to content

Commit

Permalink
[NTUSER] menu.c: Remove parentheses around return value
Browse files Browse the repository at this point in the history
  • Loading branch information
TAN-Gaming committed Dec 18, 2023
1 parent 4fecf3d commit 22ebdd3
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions win32ss/user/ntuser/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -5075,7 +5075,7 @@ IntMenuItemInfo(
if (!(MenuItem = MENU_FindItem( &Menu, &Item, (ByPosition ? MF_BYPOSITION : MF_BYCOMMAND) )))
{
EngSetLastError(ERROR_MENU_ITEM_NOT_FOUND);
return( FALSE);
return FALSE;
}
if (SetOrGet)
{
Expand All @@ -5085,7 +5085,7 @@ IntMenuItemInfo(
{
Ret = IntGetMenuItemInfo(Menu, MenuItem, ItemInfo);
}
return( Ret);
return Ret;
}

BOOL FASTCALL
Expand All @@ -5107,28 +5107,28 @@ UserMenuItemInfo(
if (! NT_SUCCESS(Status))
{
SetLastNtError(Status);
return( FALSE);
return FALSE;
}
if ( Size != sizeof(MENUITEMINFOW) &&
Size != FIELD_OFFSET(MENUITEMINFOW, hbmpItem) &&
Size != sizeof(ROSMENUITEMINFO) )
{
EngSetLastError(ERROR_INVALID_PARAMETER);
return( FALSE);
return FALSE;
}
Status = MmCopyFromCaller(&ItemInfo, UnsafeItemInfo, Size);
if (! NT_SUCCESS(Status))
{
SetLastNtError(Status);
return( FALSE);
return FALSE;
}
/* If this is a pre-0x0500 _WIN32_WINNT MENUITEMINFOW, you can't
set/get hbmpItem */
if (FIELD_OFFSET(MENUITEMINFOW, hbmpItem) == Size
&& 0 != (ItemInfo.fMask & MIIM_BITMAP))
{
EngSetLastError(ERROR_INVALID_PARAMETER);
return( FALSE);
return FALSE;
}

if (!(MenuItem = MENU_FindItem( &Menu, &Item, (ByPosition ? MF_BYPOSITION : MF_BYCOMMAND) )))
Expand All @@ -5138,7 +5138,7 @@ UserMenuItemInfo(
return TRUE;

EngSetLastError(ERROR_MENU_ITEM_NOT_FOUND);
return( FALSE);
return FALSE;
}

if (SetOrGet)
Expand All @@ -5154,12 +5154,12 @@ UserMenuItemInfo(
if (! NT_SUCCESS(Status))
{
SetLastNtError(Status);
return( FALSE);
return FALSE;
}
}
}

return( Ret);
return Ret;
}

BOOL FASTCALL
Expand All @@ -5177,18 +5177,18 @@ UserMenuInfo(
if (! NT_SUCCESS(Status))
{
SetLastNtError(Status);
return( FALSE);
return FALSE;
}
if ( Size < sizeof(MENUINFO) || Size > sizeof(ROSMENUINFO) )
{
EngSetLastError(ERROR_INVALID_PARAMETER);
return( FALSE);
return FALSE;
}
Status = MmCopyFromCaller(&MenuInfo, UnsafeMenuInfo, Size);
if (! NT_SUCCESS(Status))
{
SetLastNtError(Status);
return( FALSE);
return FALSE;
}

if(SetOrGet)
Expand All @@ -5206,12 +5206,12 @@ UserMenuInfo(
if (! NT_SUCCESS(Status))
{
SetLastNtError(Status);
return( FALSE);
return FALSE;
}
}
}

return( Res);
return Res;
}

BOOL FASTCALL
Expand Down

0 comments on commit 22ebdd3

Please sign in to comment.