aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-pres.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-12-31 03:14:18 +0000
committerGuy Harris <guy@alum.mit.edu>2004-12-31 03:14:18 +0000
commit018883dea94b8a05941b334ef94939c5564a107f (patch)
tree3301633853b43b39cb4b98012c7d0528bd49a35d /epan/dissectors/packet-pres.c
parent85f89615ea8cc789d085be08bf0cade3e8a068bd (diff)
"string_to_hex()" doesn't modify its first argument, so make it a
"const" pointer, and don't cast away the constness of "tvb_get_ptr()"s result when passing it to "string_to_hex()". svn path=/trunk/; revision=12898
Diffstat (limited to 'epan/dissectors/packet-pres.c')
-rw-r--r--epan/dissectors/packet-pres.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-pres.c b/epan/dissectors/packet-pres.c
index ed4b67de0a..d12218316e 100644
--- a/epan/dissectors/packet-pres.c
+++ b/epan/dissectors/packet-pres.c
@@ -248,7 +248,7 @@ call_acse_dissector(tvbuff_t *tvb, gint offset, gint param_len,
}
}
static char*
-string_to_hex(unsigned char * in,char * out,int len)
+string_to_hex(const unsigned char * in,char * out,int len)
{
char ascii[MAXSTRING];
int i;
@@ -504,7 +504,7 @@ print_value(ASN1_SCK *asn,proto_tree *pres_tree,tvbuff_t *tvb,int
gint start = *offset;
char tmp[MAXSTRING];
*offset = asn->offset; /* align to data*/
- string_to_hex((char*)tvb_get_ptr(tvb,*offset,item_len),tmp,item_len);
+ string_to_hex(tvb_get_ptr(tvb,*offset,item_len),tmp,item_len);
proto_tree_add_text(pres_tree, tvb, *offset, item_len, tmp);
(*offset)=start+item_len;
asn->offset = (*offset);