mirror of https://github.com/PCSX2/pcsx2.git
pcsx2: use sizeof of object instead of pointer (portability)
CID 146912 (#1 of 1): Sizeof not portable (SIZEOF_MISMATCH) suspicious_sizeof: Passing argument recConstBuf of type u32 * and argument 131072U /* RECCONSTBUF_SIZE * sizeof (recConstBuf) */ to function memset is suspicious. In this case, sizeof (u32 *) is equal to sizeof (u32), but this is not a portable assumption.
This commit is contained in:
parent
2430abed33
commit
113c0aa411
|
@ -710,7 +710,7 @@ static void recResetRaw()
|
|||
|
||||
maxrecmem = 0;
|
||||
|
||||
memset(recConstBuf, 0, RECCONSTBUF_SIZE * sizeof(recConstBuf));
|
||||
memset(recConstBuf, 0, RECCONSTBUF_SIZE * sizeof(*recConstBuf));
|
||||
|
||||
if( s_pInstCache )
|
||||
memset( s_pInstCache, 0, sizeof(EEINST)*s_nInstCacheSize );
|
||||
|
|
Loading…
Reference in New Issue