diff options
author | Guy Harris <guy@alum.mit.edu> | 2013-07-23 23:42:14 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2013-07-23 23:42:14 +0000 |
commit | b524ecebd87ae09527638b35d8030f902d76feac (patch) | |
tree | 84b58ffb096a55e8544030bdcf3f375afbfbc7b2 /epan/dissectors/packet-x11.c | |
parent | 8e22ded7f8537e37e89ba558c83702d127443ae8 (diff) |
Don't cast away constness (except in cases where an API makes that
impossible).
svn path=/trunk/; revision=50856
Diffstat (limited to 'epan/dissectors/packet-x11.c')
-rw-r--r-- | epan/dissectors/packet-x11.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/epan/dissectors/packet-x11.c b/epan/dissectors/packet-x11.c index ec83fea59c..4d52883a7d 100644 --- a/epan/dissectors/packet-x11.c +++ b/epan/dissectors/packet-x11.c @@ -2150,8 +2150,11 @@ static void string16_with_buffer_preallocated(tvbuff_t *tvb, proto_tree *t, if (truncated) { *dp++ = '.'; *dp++ = '.'; *dp++ = '.'; } *dp++ = '\0'; - proto_tree_add_string_format(t, hf, tvb, offset, length, (gchar *)tvb_get_ptr(tvb, offset, length), "%s: %s", - proto_registrar_get_nth(hf) -> name, *s); + proto_tree_add_string_format(t, hf, tvb, offset, length, + (const gchar *)tvb_get_ptr(tvb, offset, length), + "%s: %s", + proto_registrar_get_nth(hf) -> name, + *s); } else proto_tree_add_item(t, hf_bytes, tvb, offset, length, byte_order); |