Alexandre Julliard : rpcrt4: Make the protseq_ops structure constant.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Jun 9 11:16:19 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: c32dc6744c3f7cc1c373ce9a275fbc2a00f0e4f5
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=c32dc6744c3f7cc1c373ce9a275fbc2a00f0e4f5

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Jun  9 13:12:58 2006 +0200

rpcrt4: Make the protseq_ops structure constant.

---

 dlls/rpcrt4/rpc_binding.h   |    2 +-
 dlls/rpcrt4/rpc_transport.c |   10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dlls/rpcrt4/rpc_binding.h b/dlls/rpcrt4/rpc_binding.h
index 0723a22..bf089a6 100644
--- a/dlls/rpcrt4/rpc_binding.h
+++ b/dlls/rpcrt4/rpc_binding.h
@@ -45,7 +45,7 @@ typedef struct _RpcConnection
   BOOL server;
   LPSTR NetworkAddr;
   LPSTR Endpoint;
-  struct protseq_ops *ops;
+  const struct protseq_ops *ops;
   USHORT MaxTransmissionSize;
   /* The active interface bound to server. */
   RPC_SYNTAX_IDENTIFIER ActiveInterface;
diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c
index c9028bb..e32e8c2 100644
--- a/dlls/rpcrt4/rpc_transport.c
+++ b/dlls/rpcrt4/rpc_transport.c
@@ -701,7 +701,7 @@ static RPC_STATUS rpcrt4_ncacn_ip_tcp_pa
     return RPC_S_OK;
 }
 
-struct protseq_ops protseq_list[] = {
+static const struct protseq_ops protseq_list[] = {
   { "ncacn_np",
     { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_SMB },
     rpcrt4_conn_np_alloc,
@@ -742,7 +742,7 @@ struct protseq_ops protseq_list[] = {
 
 #define MAX_PROTSEQ (sizeof protseq_list / sizeof protseq_list[0])
 
-static struct protseq_ops *rpcrt4_get_protseq_ops(const char *protseq)
+static const struct protseq_ops *rpcrt4_get_protseq_ops(const char *protseq)
 {
   int i;
   for(i=0; i<MAX_PROTSEQ; i++)
@@ -771,7 +771,7 @@ RPC_STATUS RPCRT4_CreateConnection(RpcCo
     LPCSTR Protseq, LPCSTR NetworkAddr, LPCSTR Endpoint,
     LPCSTR NetworkOptions, RpcAuthInfo* AuthInfo, RpcBinding* Binding)
 {
-  struct protseq_ops *ops;
+  const struct protseq_ops *ops;
   RpcConnection* NewConnection;
 
   ops = rpcrt4_get_protseq_ops(Protseq);
@@ -863,7 +863,7 @@ RPC_STATUS RpcTransport_GetTopOfTower(un
                                       const char *endpoint)
 {
     twr_empty_floor_t *protocol_floor;
-    struct protseq_ops *protseq_ops = rpcrt4_get_protseq_ops(protseq);
+    const struct protseq_ops *protseq_ops = rpcrt4_get_protseq_ops(protseq);
 
     *tower_size = 0;
 
@@ -901,7 +901,7 @@ RPC_STATUS RpcTransport_ParseTopOfTower(
 {
     twr_empty_floor_t *protocol_floor;
     twr_empty_floor_t *floor4;
-    struct protseq_ops *protseq_ops = NULL;
+    const struct protseq_ops *protseq_ops = NULL;
     RPC_STATUS status;
     int i;
 




More information about the wine-cvs mailing list