summaryrefslogtreecommitdiff
path: root/epan
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss.ws@gmail.com>2012-09-03 19:33:45 +0000
committerJeff Morriss <jeff.morriss.ws@gmail.com>2012-09-03 19:33:45 +0000
commitf90f3f3438deaacf760acec2302800d0650d5274 (patch)
treee01032c2c946f972465dba4ddd7a9ca15f4c2947 /epan
parentd522ab8a42ee6b56f00827c9ec8ee6d1351224af (diff)
downloadwireshark-f90f3f3438deaacf760acec2302800d0650d5274.tar.gz
Don't fetch the value twice (unsigned integer case). Fix a cut-n-pasteo.
svn path=/trunk/; revision=44757
Diffstat (limited to 'epan')
-rw-r--r--epan/proto.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/epan/proto.c b/epan/proto.c
index aad2341433..511c6d9dd0 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -1138,8 +1138,6 @@ get_uint_value(proto_tree *tree, tvbuff_t *tvb, gint offset, gint length, const
: tvb_get_ntohl(tvb, offset);
}
report_type_length_mismatch(tree, "an unsigned integer", length, length_error);
- value = encoding ? tvb_get_letohl(tvb, offset)
- : tvb_get_ntohl(tvb, offset);
break;
}
return value;
@@ -1191,9 +1189,7 @@ get_int_value(proto_tree *tree, tvbuff_t *tvb, gint offset, gint length, const g
value = encoding ? tvb_get_letohl(tvb, offset)
: tvb_get_ntohl(tvb, offset);
}
- report_type_length_mismatch(tree, "an unsigned integer", length, length_error);
- value = encoding ? tvb_get_letohl(tvb, offset)
- : tvb_get_ntohl(tvb, offset);
+ report_type_length_mismatch(tree, "a signed integer", length, length_error);
break;
}
return value;