aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-fcip.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-12-31 02:48:53 +0000
committerGuy Harris <guy@alum.mit.edu>2004-12-31 02:48:53 +0000
commit29c1d25ddc73deed86e3af46b635a249c29e9e33 (patch)
tree81e926bd6e919f40a656e069e7bb061485ec560e /epan/dissectors/packet-fcip.c
parent9d9687dd5a88822f15f43120ca085114478bd12a (diff)
Use "tvb_memeql()" to check whether specified bytes in a packet have a
specified value. Make a constant array "const". svn path=/trunk/; revision=12895
Diffstat (limited to 'epan/dissectors/packet-fcip.c')
-rw-r--r--epan/dissectors/packet-fcip.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/epan/dissectors/packet-fcip.c b/epan/dissectors/packet-fcip.c
index ffd364a02d..5e7e17471a 100644
--- a/epan/dissectors/packet-fcip.c
+++ b/epan/dissectors/packet-fcip.c
@@ -107,8 +107,8 @@ static const value_string fcencap_proto_vals[] = {
{0, NULL},
};
-static guint fcip_header_2_bytes[2] = {FCIP_ENCAP_PROTO_VER,
- FCIP_ENCAP_PROTO_VER};
+static const guint fcip_header_2_bytes[2] = {FCIP_ENCAP_PROTO_VER,
+ FCIP_ENCAP_PROTO_VER};
static int proto_fcip = -1;
@@ -216,8 +216,8 @@ NXT_BYTE: while (bytes_remaining) {
/*
* Tests a, b and c
*/
- if (memcmp ((void *)tvb_get_ptr (tvb, offset, 8),
- (void *)fcip_header_2_bytes, 8) != 0) {
+ if (tvb_memeql(tvb, offset, (const guint8 *)fcip_header_2_bytes,
+ 8) != 0) {
offset++;
bytes_remaining--;
goto NXT_BYTE;
@@ -287,8 +287,8 @@ NXT_BYTE: while (bytes_remaining) {
if (bytes_remaining >= (frame_len)) {
if (tvb_bytes_exist (tvb, offset+frame_len, 8)) {
/* The start of the next header matches what we wish to see */
- if (memcmp ((void *)tvb_get_ptr (tvb, offset+frame_len, 8),
- (void *)fcip_header_2_bytes, 8) == 0) {
+ if (tvb_memeql (tvb, offset+frame_len,
+ (const guint8 *)fcip_header_2_bytes, 8) == 0) {
return (offset);
}
else {