Module: wine Branch: master Commit: a8f7c716ef2c9558be75dc68773601060916bd25 URL: http://source.winehq.org/git/wine.git/?a=commit;h=a8f7c716ef2c9558be75dc6877...
Author: Rob Shearman robertshearman@gmail.com Date: Fri Sep 5 22:07:56 2008 +0100
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.
---
dlls/rpcrt4/ndr_marshall.c | 8 ++++---- include/rpcndr.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index bda04be..80e5b81 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -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); }
diff --git a/include/rpcndr.h b/include/rpcndr.h index 7c0efaf..2503a3a 100644 --- a/include/rpcndr.h +++ b/include/rpcndr.h @@ -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 );