aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-cosnaming.c
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss@ulticom.com>2012-07-08 03:57:35 +0000
committerJeff Morriss <jeff.morriss@ulticom.com>2012-07-08 03:57:35 +0000
commit0cb874b9ec43a57cfa2b2fc3063c330e5e7b67f4 (patch)
tree4277bfc43f5cf34be2abf1f88dc207937034ff5f /epan/dissectors/packet-cosnaming.c
parenta2c47166702e5b514d8a4b5a5491db19f6bb689a (diff)
Add a function to packet-giop.c that does what the code that
template_get_CDR_string (in wireshark_gen.py) did. This eliminates another whole pile of function-local variables in packet-parlay.c. Unfortunately it doesn't seem to speed up compilation (or eliminate the variable tracking size limit problem). But it does eliminate a lot of lines of code... svn path=/trunk/; revision=43610
Diffstat (limited to 'epan/dissectors/packet-cosnaming.c')
-rw-r--r--epan/dissectors/packet-cosnaming.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/epan/dissectors/packet-cosnaming.c b/epan/dissectors/packet-cosnaming.c
index 37fa89bb48..9f3cec0f87 100644
--- a/epan/dissectors/packet-cosnaming.c
+++ b/epan/dissectors/packet-cosnaming.c
@@ -1246,28 +1246,12 @@ decode_CosNaming_NameComponent_st(tvbuff_t *tvb _U_, packet_info *pinfo _U_, pro
/* Operation specific Variable declarations Begin */
- guint32 u_octet4;
- gchar *seq = NULL;
/* Operation specific Variable declarations End */
- u_octet4 = get_CDR_string(tvb, &seq, offset, stream_is_big_endian, boundary);
- if (tree) {
- proto_tree_add_text(tree,tvb,*offset-u_octet4,u_octet4,"NameComponent_id (%u) = %s",
- u_octet4, (u_octet4 > 0) ? seq : "");
- }
-
- g_free(seq); /* free buffer */
- seq = NULL;
-
- u_octet4 = get_CDR_string(tvb, &seq, offset, stream_is_big_endian, boundary);
- if (tree) {
- proto_tree_add_text(tree,tvb,*offset-u_octet4,u_octet4,"NameComponent_kind (%u) = %s",
- u_octet4, (u_octet4 > 0) ? seq : "");
- }
+ giop_add_CDR_string(tree, tvb, offset, stream_is_big_endian, boundary, "NameComponent_id");
- g_free(seq); /* free buffer */
- seq = NULL;
+ giop_add_CDR_string(tree, tvb, offset, stream_is_big_endian, boundary, "NameComponent_kind");
}