avifil32: Simplify comparing two unsigned ints (PVS-Studio).
This commit is contained in:
parent
6985bbdf65
commit
066fd36ec3
|
@ -465,13 +465,12 @@ static HRESULT WINAPI IAVIFile_fnDeleteStream(IAVIFile *iface, DWORD fccType, LO
|
||||||
This->ppStreams[nStream] != NULL) {
|
This->ppStreams[nStream] != NULL) {
|
||||||
/* ... so delete it now */
|
/* ... so delete it now */
|
||||||
HeapFree(GetProcessHeap(), 0, This->ppStreams[nStream]);
|
HeapFree(GetProcessHeap(), 0, This->ppStreams[nStream]);
|
||||||
|
This->fInfo.dwStreams--;
|
||||||
if (This->fInfo.dwStreams - nStream > 0)
|
if (nStream < This->fInfo.dwStreams)
|
||||||
memcpy(This->ppStreams + nStream, This->ppStreams + nStream + 1,
|
memmove(&This->ppStreams[nStream], &This->ppStreams[nStream + 1],
|
||||||
(This->fInfo.dwStreams - nStream) * sizeof(IAVIStreamImpl*));
|
(This->fInfo.dwStreams - nStream) * sizeof(This->ppStreams[0]));
|
||||||
|
|
||||||
This->ppStreams[This->fInfo.dwStreams] = NULL;
|
This->ppStreams[This->fInfo.dwStreams] = NULL;
|
||||||
This->fInfo.dwStreams--;
|
|
||||||
This->fDirty = TRUE;
|
This->fDirty = TRUE;
|
||||||
|
|
||||||
/* This->fInfo will be updated further when asked for */
|
/* This->fInfo will be updated further when asked for */
|
||||||
|
|
Loading…
Reference in New Issue