rpcrt4: Change type of len parameter of NdrAllocate from size_t to SIZE_T.

Use SIZE_T as it matches the size that Windows programs expect whereas
size_t is platform-dependent.
oldstable
Rob Shearman 2008-09-05 22:07:56 +01:00 committed by Alexandre Julliard
parent 3c4f44d1af
commit a8f7c716ef
2 changed files with 5 additions and 5 deletions

View File

@ -361,10 +361,10 @@ typedef struct _NDR_MEMORY_LIST
* If the function is unable to allocate memory an ERROR_OUTOFMEMORY
* exception is raised.
*/
void * WINAPI NdrAllocate(MIDL_STUB_MESSAGE *pStubMsg, size_t len)
void * WINAPI NdrAllocate(MIDL_STUB_MESSAGE *pStubMsg, SIZE_T len)
{
size_t aligned_len;
size_t adjusted_len;
SIZE_T aligned_len;
SIZE_T adjusted_len;
void *p;
NDR_MEMORY_LIST *mem_list;
@ -373,7 +373,7 @@ void * WINAPI NdrAllocate(MIDL_STUB_MESSAGE *pStubMsg, size_t len)
/* check for overflow */
if (adjusted_len < len)
{
ERR("overflow of adjusted_len %d, len %d\n", adjusted_len, len);
ERR("overflow of adjusted_len %ld, len %ld\n", adjusted_len, len);
RpcRaiseException(RPC_X_BAD_STUB_DATA);
}

View File

@ -652,7 +652,7 @@ RPCRTAPI LONG RPC_ENTRY
NdrDcomAsyncStubCall( struct IRpcStubBuffer* pThis, struct IRpcChannelBuffer* pChannel, PRPC_MESSAGE pRpcMsg, DWORD * pdwStubPhase );
RPCRTAPI void* RPC_ENTRY
NdrAllocate( PMIDL_STUB_MESSAGE pStubMsg, size_t Len ) __WINE_ALLOC_SIZE(2);
NdrAllocate( PMIDL_STUB_MESSAGE pStubMsg, SIZE_T Len ) __WINE_ALLOC_SIZE(2);
RPCRTAPI void RPC_ENTRY
NdrClearOutParameters( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat, void *ArgAddr );