Commit 066fd36e authored by André Hentschel's avatar André Hentschel Committed by Alexandre Julliard

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

parent 6985bbdf
......@@ -465,13 +465,12 @@ static HRESULT WINAPI IAVIFile_fnDeleteStream(IAVIFile *iface, DWORD fccType, LO
This->ppStreams[nStream] != NULL) {
/* ... so delete it now */
HeapFree(GetProcessHeap(), 0, This->ppStreams[nStream]);
if (This->fInfo.dwStreams - nStream > 0)
memcpy(This->ppStreams + nStream, This->ppStreams + nStream + 1,
(This->fInfo.dwStreams - nStream) * sizeof(IAVIStreamImpl*));
This->fInfo.dwStreams--;
if (nStream < This->fInfo.dwStreams)
memmove(&This->ppStreams[nStream], &This->ppStreams[nStream + 1],
(This->fInfo.dwStreams - nStream) * sizeof(This->ppStreams[0]));
This->ppStreams[This->fInfo.dwStreams] = NULL;
This->fInfo.dwStreams--;
This->fDirty = TRUE;
/* This->fInfo will be updated further when asked for */
......
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