Commit 2bf09a9d authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

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

parent 39eede13
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment