avifil32: Simplify comparing two unsigned ints (PVS-Studio).

This commit is contained in:
Michael Stefaniuc 2014-10-27 20:03:33 +01:00 committed by Alexandre Julliard
parent 39eede134e
commit 2bf09a9d25
1 changed files with 3 additions and 4 deletions

View File

@ -169,10 +169,9 @@ static HRESULT AVIFILE_RemoveStream(IAVIEditStreamImpl* const This, DWORD nr)
/* remove part nr */
IAVIStream_Release(This->pStreams[nr].pStream);
This->nStreams--;
if (This->nStreams - nr > 0) {
memmove(This->pStreams + nr, This->pStreams + nr + 1,
(This->nStreams - nr) * sizeof(EditStreamTable));
}
if (nr < This->nStreams)
memmove(&This->pStreams[nr], &This->pStreams[nr + 1],
(This->nStreams - nr) * sizeof(This->pStreams[0]));
This->pStreams[This->nStreams].pStream = NULL;
This->pStreams[This->nStreams].dwStart = 0;
This->pStreams[This->nStreams].dwLength = 0;