Re: d3dx9_36/tests: Fix sizeof to be more portable (coverity)
On 24 October 2012 02:05, André Hentschel <nerv(a)dawncrow.de> wrote:
face_remap = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, - tc[i].num_faces*sizeof(face_remap)); + tc[i].num_faces*sizeof(DWORD*));
I'm don't know what Coverity actually says about this, but this looks just as wrong to me. It's probably supposed to be "sizeof(*face_remap)".
Am 24.10.2012 02:32, schrieb Henri Verbeet:
On 24 October 2012 02:05, André Hentschel <nerv(a)dawncrow.de> wrote:
face_remap = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, - tc[i].num_faces*sizeof(face_remap)); + tc[i].num_faces*sizeof(DWORD*));
I'm don't know what Coverity actually says about this, but this looks just as wrong to me. It's probably supposed to be "sizeof(*face_remap)".
That's actually what Coverity suggested, but i thought i've seen more sizeofs of this kind. -- Best Regards, André Hentschel
participants (2)
-
André Hentschel -
Henri Verbeet