diff options
author | Bill Meier <wmeier@newsguy.com> | 2011-05-20 15:44:25 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2011-05-20 15:44:25 +0000 |
commit | f3432a973c8bd979334674740903956c55e7cff9 (patch) | |
tree | 8decbb3e16d7182eeb1c189ee81e6d7ef0b74812 /epan/dissectors/packet-rtmpt.c | |
parent | 4910bc142fcf8072e26179a4fe77c257ecc20225 (diff) | |
download | wireshark-f3432a973c8bd979334674740903956c55e7cff9.tar.gz |
Don't assign to a proto_item* if the value won't be used:
Fixes Coverity 903,935,968,985,997,999,1024,1025,1134;
Remove unneeded #includes;
Do whitespace cleanup.
svn path=/trunk/; revision=37331
Diffstat (limited to 'epan/dissectors/packet-rtmpt.c')
-rw-r--r-- | epan/dissectors/packet-rtmpt.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/epan/dissectors/packet-rtmpt.c b/epan/dissectors/packet-rtmpt.c index 8b319c832b..11b06e3a05 100644 --- a/epan/dissectors/packet-rtmpt.c +++ b/epan/dissectors/packet-rtmpt.c @@ -43,11 +43,10 @@ # include "config.h" #endif -#include <stdio.h> #include <string.h> -#include <glib.h> #include <epan/packet.h> + #include <epan/emem.h> #include <epan/conversation.h> #include <epan/strutil.h> @@ -574,7 +573,7 @@ rtmpt_get_amf_param(tvbuff_t *tvb, gint offset, gint param, const gchar *prop) iStringLength = tvb_get_ntohs(tvb, offset+2+iPropLength+1); if (remain<2+iPropLength+3+iStringLength) break; - + return tvb_get_ephemeral_string(tvb, offset+2+iPropLength+3, iStringLength); } @@ -628,7 +627,7 @@ rtmpt_get_packet_desc(tvbuff_t *tvb, guint32 offset, guint32 remain, rtmpt_conv_ if (tp->len>=5 && remain>=5) { *deschasopcode = TRUE; return ep_strdup_printf("%s %d,%s", - val_to_str(tp->cmd, rtmpt_opcode_vals, "Unknown (0x%01x)"), + val_to_str(tp->cmd, rtmpt_opcode_vals, "Unknown (0x%01x)"), tvb_get_ntohl(tvb, offset), val_to_str(tvb_get_guint8(tvb, offset+4), rtmpt_limit_vals, "Unknown (%d)")); } @@ -945,7 +944,7 @@ dissect_rtmpt_body_command(tvbuff_t *tvb, gint offset, proto_tree *rtmpt_tree, g proto_tree_add_item(val_tree, hf_rtmpt_amf_longstringlength, tvb, iValueOffset-iValueExtra+1, 4, FALSE); } if (iValueLength>0 && hfvalue!=-1) { - ti = proto_tree_add_item(val_tree, hfvalue, tvb, iValueOffset, iValueLength, FALSE); + proto_tree_add_item(val_tree, hfvalue, tvb, iValueOffset, iValueLength, FALSE); } } |