Browse Source

Get rid of MEMDUP() macro.

Darryl Pogue 13 years ago committed by Adam Johnson
parent
commit
4159663415
  1. 1
      Sources/Plasma/CoreLib/hsMalloc.h
  2. 3
      Sources/Plasma/NucleusLib/pnNetProtocol/Private/pnNpCommon.h

1
Sources/Plasma/CoreLib/hsMalloc.h

@ -167,7 +167,6 @@ inline void CDECL operator delete (void *, void *) {}
#define ALLOC(b) MemAlloc(b, 0, __FILE__, __LINE__)
#define ALLOCZERO(b) MemAlloc(b, kMemZero, __FILE__, __LINE__)
#define ALLOCFLAGS(b, f) MemAlloc(b, (f), __FILE__, __LINE__)
#define MEMDUP(s, b) MemDup(s, b, 0, __FILE__, __LINE__)
#define ZERO(s) MemSet(&s, 0, sizeof(s))
#define ZEROPTR(p) MemSet(p, 0, sizeof(*p))

3
Sources/Plasma/NucleusLib/pnNetProtocol/Private/pnNpCommon.h

@ -384,7 +384,8 @@ inline void IVaultNodeSetBlob (
) {
free(*pdst);
if (src) {
*pdst = (uint8_t*)MEMDUP(src, srcLen);
*pdst = (uint8_t*)malloc(srcLen);
memcpy(*pdst, src, srcLen);
*pdstLen = srcLen;
}
else {

Loading…
Cancel
Save