Integrate pull request feedback
Use while instead of for with additional variable where appropriate.
This commit is contained in:
parent
9f6fa7ef4c
commit
28e63786cd
@ -107,9 +107,8 @@ static BOOL update_message_BitmapUpdate(rdpContext* context, BITMAP_UPDATE* bitm
|
||||
wParam->rectangles[index].bitmapDataStream = (BYTE*) malloc(wParam->rectangles[index].bitmapLength);
|
||||
if (!wParam->rectangles[index].bitmapDataStream)
|
||||
{
|
||||
UINT32 i;
|
||||
for (i = 0; i < index; ++i)
|
||||
free(wParam->rectangles[i].bitmapDataStream);
|
||||
while(index)
|
||||
free(wParam->rectangles[--index].bitmapDataStream);
|
||||
|
||||
free(wParam->rectangles);
|
||||
free(wParam);
|
||||
|
@ -755,9 +755,9 @@ rdpSettings* freerdp_settings_clone(rdpSettings* settings)
|
||||
_settings->TargetNetAddresses[index] = _strdup(settings->TargetNetAddresses[index]);
|
||||
if (!_settings->TargetNetAddresses[index])
|
||||
{
|
||||
UINT32 i;
|
||||
for (i = 0; i < index; ++i)
|
||||
free(_settings->TargetNetAddresses[i]);
|
||||
while(index)
|
||||
free(_settings->TargetNetAddresses[--index]);
|
||||
|
||||
free(_settings->TargetNetAddresses);
|
||||
_settings->TargetNetAddresses = NULL;
|
||||
_settings->TargetNetAddressCount = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user