Declare cur_rt in the narrowest possible scope.

Change-Id: I0604d6f9f4bb2c58bb74a9b375f644474b68c28f
Reviewed-on: https://code.wireshark.org/review/6074
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2014-12-27 02:57:22 -08:00
parent ca6f84916f
commit c04aebd761
1 changed files with 2 additions and 1 deletions

View File

@ -2294,7 +2294,6 @@ dissect_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
if (tree) {
const char *dst_host;
guint32 cur_rt;
memcpy(&addr, iph->ip_dst.data, 4);
dst_host = get_hostname(addr);
@ -2304,6 +2303,8 @@ dissect_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
}
if (dst_off) {
guint32 cur_rt;
cur_rt = tvb_get_ipv4(tvb, offset + 16);
if (ip_summary_in_tree) {
proto_item_append_text(ti, ", Via: %s (%s)", get_hostname(cur_rt),