Andrew Talbot : rpcrt4: Constify some variables.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Aug 20 07:42:40 CDT 2007
Module: wine
Branch: master
Commit: fa3d623882894a3919f3fdfd96d0db71e49aa40c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=fa3d623882894a3919f3fdfd96d0db71e49aa40c
Author: Andrew Talbot <andrew.talbot at talbotville.com>
Date: Fri Aug 17 22:10:58 2007 +0100
rpcrt4: Constify some variables.
---
dlls/rpcrt4/ndr_marshall.c | 16 ++++++++--------
dlls/rpcrt4/rpc_binding.c | 4 ++--
dlls/rpcrt4/rpc_binding.h | 5 +++--
dlls/rpcrt4/rpc_message.c | 2 +-
4 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c
index b1b8fa3..de84410 100644
--- a/dlls/rpcrt4/ndr_marshall.c
+++ b/dlls/rpcrt4/ndr_marshall.c
@@ -1748,7 +1748,7 @@ void WINAPI NdrSimpleStructFree(PMIDL_STUB_MESSAGE pStubMsg,
}
-static unsigned long EmbeddedComplexSize(PMIDL_STUB_MESSAGE pStubMsg,
+static unsigned long EmbeddedComplexSize(const MIDL_STUB_MESSAGE *pStubMsg,
PFORMAT_STRING pFormat)
{
switch (*pFormat) {
@@ -3109,7 +3109,7 @@ void WINAPI NdrComplexArrayFree(PMIDL_STUB_MESSAGE pStubMsg,
pMemory = ComplexFree(pStubMsg, pMemory, pFormat, NULL);
}
-static ULONG UserMarshalFlags(PMIDL_STUB_MESSAGE pStubMsg)
+static ULONG UserMarshalFlags(const MIDL_STUB_MESSAGE *pStubMsg)
{
return MAKELONG(pStubMsg->dwDestContext,
pStubMsg->RpcMsg->DataRepresentation);
@@ -4419,7 +4419,7 @@ void WINAPI NdrVaryingArrayFree(PMIDL_STUB_MESSAGE pStubMsg,
EmbeddedPointerFree(pStubMsg, pMemory, pFormat);
}
-static ULONG get_discriminant(unsigned char fc, unsigned char *pMemory)
+static ULONG get_discriminant(unsigned char fc, const unsigned char *pMemory)
{
switch (fc)
{
@@ -4427,16 +4427,16 @@ static ULONG get_discriminant(unsigned char fc, unsigned char *pMemory)
case RPC_FC_CHAR:
case RPC_FC_SMALL:
case RPC_FC_USMALL:
- return *(UCHAR *)pMemory;
+ return *(const UCHAR *)pMemory;
case RPC_FC_WCHAR:
case RPC_FC_SHORT:
case RPC_FC_USHORT:
case RPC_FC_ENUM16:
- return *(USHORT *)pMemory;
+ return *(const USHORT *)pMemory;
case RPC_FC_LONG:
case RPC_FC_ULONG:
case RPC_FC_ENUM32:
- return *(ULONG *)pMemory;
+ return *(const ULONG *)pMemory;
default:
FIXME("Unhandled base type: 0x%02x\n", fc);
return 0;
@@ -5773,7 +5773,7 @@ static struct context_handle_entry *get_context_entry(NDR_CCONTEXT CContext)
return che;
}
-static struct context_handle_entry *context_entry_from_guid(LPGUID uuid)
+static struct context_handle_entry *context_entry_from_guid(LPCGUID uuid)
{
struct context_handle_entry *che;
LIST_FOR_EACH_ENTRY(che, &context_handle_list, struct context_handle_entry, entry)
@@ -5823,7 +5823,7 @@ void WINAPI NDRCContextMarshall(NDR_CCONTEXT CContext, void *pBuff)
static UINT ndr_update_context_handle(NDR_CCONTEXT *CContext,
RPC_BINDING_HANDLE hBinding,
- ndr_context_handle *chi)
+ const ndr_context_handle *chi)
{
struct context_handle_entry *che = NULL;
diff --git a/dlls/rpcrt4/rpc_binding.c b/dlls/rpcrt4/rpc_binding.c
index db30be6..f69d290 100644
--- a/dlls/rpcrt4/rpc_binding.c
+++ b/dlls/rpcrt4/rpc_binding.c
@@ -274,8 +274,8 @@ RPC_STATUS RPCRT4_DestroyBinding(RpcBinding* Binding)
}
RPC_STATUS RPCRT4_OpenBinding(RpcBinding* Binding, RpcConnection** Connection,
- PRPC_SYNTAX_IDENTIFIER TransferSyntax,
- PRPC_SYNTAX_IDENTIFIER InterfaceId)
+ const RPC_SYNTAX_IDENTIFIER *TransferSyntax,
+ const RPC_SYNTAX_IDENTIFIER *InterfaceId)
{
TRACE("(Binding == ^%p)\n", Binding);
diff --git a/dlls/rpcrt4/rpc_binding.h b/dlls/rpcrt4/rpc_binding.h
index 5113b27..f01ae6e 100644
--- a/dlls/rpcrt4/rpc_binding.h
+++ b/dlls/rpcrt4/rpc_binding.h
@@ -161,13 +161,14 @@ RPC_STATUS RPCRT4_SetBindingObject(RpcBinding* Binding, const UUID* ObjectUuid);
RPC_STATUS RPCRT4_MakeBinding(RpcBinding** Binding, RpcConnection* Connection);
RPC_STATUS RPCRT4_ExportBinding(RpcBinding** Binding, RpcBinding* OldBinding);
RPC_STATUS RPCRT4_DestroyBinding(RpcBinding* Binding);
-RPC_STATUS RPCRT4_OpenBinding(RpcBinding* Binding, RpcConnection** Connection, PRPC_SYNTAX_IDENTIFIER TransferSyntax, PRPC_SYNTAX_IDENTIFIER InterfaceId);
+RPC_STATUS RPCRT4_OpenBinding(RpcBinding* Binding, RpcConnection** Connection,
+ const RPC_SYNTAX_IDENTIFIER *TransferSyntax, const RPC_SYNTAX_IDENTIFIER *InterfaceId);
RPC_STATUS RPCRT4_CloseBinding(RpcBinding* Binding, RpcConnection* Connection);
BOOL RPCRT4_RPCSSOnDemandCall(PRPCSS_NP_MESSAGE msg, char *vardata_payload, PRPCSS_NP_REPLY reply);
HANDLE RPCRT4_GetMasterMutex(void);
HANDLE RPCRT4_RpcssNPConnect(void);
-static inline const char *rpcrt4_conn_get_name(RpcConnection *Connection)
+static inline const char *rpcrt4_conn_get_name(const RpcConnection *Connection)
{
return Connection->ops->name;
}
diff --git a/dlls/rpcrt4/rpc_message.c b/dlls/rpcrt4/rpc_message.c
index b19e7f1..37839f7 100644
--- a/dlls/rpcrt4/rpc_message.c
+++ b/dlls/rpcrt4/rpc_message.c
@@ -440,7 +440,7 @@ static RPC_STATUS RPCRT4_SecurePacket(RpcConnection *Connection,
*/
static RPC_STATUS RPCRT4_SendAuth(RpcConnection *Connection, RpcPktHdr *Header,
void *Buffer, unsigned int BufferLength,
- void *Auth, unsigned int AuthLength)
+ const void *Auth, unsigned int AuthLength)
{
PUCHAR buffer_pos;
DWORD hdr_size;
More information about the wine-cvs
mailing list