Fixed some scanbuild warnings.

This commit is contained in:
Armin Novak 2019-11-22 11:47:16 +01:00
parent 2d87a84991
commit c4a141cd8a
2 changed files with 2 additions and 5 deletions

View File

@ -1743,7 +1743,7 @@ UINT urbdrc_process_udev_data_transfer(URBDRC_CHANNEL_CALLBACK* callback, URBDRC
len = Stream_GetRemainingLength(data);
if (Stream_GetRemainingCapacity(data) < 8)
if (len < 8)
goto fail;
Stream_Rewind_UINT32(data);

View File

@ -379,13 +379,10 @@ static UINT urbdrc_exchange_capabilities(URBDRC_CHANNEL_CALLBACK* callback, wStr
UINT32 FunctionId;
UINT32 InterfaceId;
UINT error = CHANNEL_RC_OK;
URBDRC_PLUGIN* urbdrc;
if (!callback || !data || !callback->plugin)
if (!data)
return ERROR_INVALID_PARAMETER;
urbdrc = (URBDRC_PLUGIN*)callback->plugin;
if (Stream_GetRemainingLength(data) < 8)
return ERROR_INVALID_DATA;