Constify some variables, functions, and structure members to squelch
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 29 Jul 2005 03:49:23 +0000 (03:49 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 29 Jul 2005 03:49:23 +0000 (03:49 +0000)
compiler warnings.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15138 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-rpc.c
epan/dissectors/packet-rpc.h
tap-rpcstat.c

index 9999b357509ba833166b3e77dca4ebbb66bc7ae5..2c3f272b0a16ace13537d1136faff0089015d4ac 100644 (file)
@@ -333,11 +333,12 @@ rpc_init_proc_table(guint prog, guint vers, const vsff *proc_table,
 
 
 /*     return the name associated with a previously registered procedure. */
-char *rpc_proc_name(guint32 prog, guint32 vers, guint32 proc)
+const char *
+rpc_proc_name(guint32 prog, guint32 vers, guint32 proc)
 {
        rpc_proc_info_key key;
        rpc_proc_info_value *value;
-       char *procname;
+       const char *procname;
        static char procname_static[20];
 
        key.prog = prog;
@@ -1495,7 +1496,7 @@ dissect_rpc_indir_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
        static address null_address = { AT_NONE, 0, NULL };
        rpc_call_info_key rpc_call_key;
        rpc_call_info_value *rpc_call;
-       char *procname = NULL;
+       const char *procname = NULL;
        char procname_static[20];
        dissect_function_t *dissect_function = NULL;
 
index 1a8c06ab15d6bfb1cd1948245e7337db78e10f5e..e5bf56619916918197f491a1b44a411be3b2b54b 100644 (file)
@@ -121,7 +121,7 @@ extern void rpc_init_proc_table(guint prog, guint vers, const vsff *proc_table,
     int procedure_hf);
 extern void rpc_init_prog(int proto, guint32 prog, int ett);
 extern const char *rpc_prog_name(guint32 prog);
-extern char *rpc_proc_name(guint32 prog, guint32 vers, guint32 proc);
+extern const char *rpc_proc_name(guint32 prog, guint32 vers, guint32 proc);
 extern int rpc_prog_hf(guint32 prog, guint32 vers);
 
 extern unsigned int rpc_roundup(unsigned int a);
@@ -183,7 +183,7 @@ typedef struct _rpc_proc_info_key {
 } rpc_proc_info_key;
 
 typedef struct _rpc_proc_info_value {
-       gchar           *name;
+       const gchar     *name;
        dissect_function_t *dissect_call;
        dissect_function_t *dissect_reply;
 } rpc_proc_info_value;
index c0981a3a31775582f2ca7cb7c176b0107f65b740..ec178440dcbb263973d4ecb97fe4732f8ad5aecb 100644 (file)
@@ -46,7 +46,7 @@
 
 /* used to keep track of statistics for a specific procedure */
 typedef struct _rpc_procedure_t {
-       char *proc;
+       const char *proc;
        int num;
        nstime_t min;
        nstime_t max;