summaryrefslogtreecommitdiff
path: root/wiretap
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-04-30 11:08:20 -0700
committerGuy Harris <guy@alum.mit.edu>2017-04-30 18:10:18 +0000
commit9606d671f6c19482a19c11daebd2fafc31c94a57 (patch)
tree64020c91eba283f8f63c7257ba1944e3d965743a /wiretap
parent2700055d3cc6f6ddc7c8c0be4adb29f064f2f959 (diff)
downloadwireshark-9606d671f6c19482a19c11daebd2fafc31c94a57.tar.gz
Use some #defines.
Change-Id: I9cafd3b745eb0fec39c0a9b5f529249584107971 Reviewed-on: https://code.wireshark.org/review/21435 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/vwr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/wiretap/vwr.c b/wiretap/vwr.c
index e97c33ed1e..7006c53e2c 100644
--- a/wiretap/vwr.c
+++ b/wiretap/vwr.c
@@ -1142,10 +1142,10 @@ static gboolean vwr_read_s1_W_rec(vwr_t *vwr, struct wtap_pkthdr *phdr,
/* Calculate the start of the statistics block in the buffer */
/* Also get a bunch of fields from the stats block */
s_ptr = &(rec[rec_size - v22_W_STATS_LEN]); /* point to it */
- m_type = s_ptr[v22_W_MTYPE_OFF] & 0x7;
- f_tx = !(s_ptr[v22_W_MTYPE_OFF] & 0x8);
+ m_type = s_ptr[v22_W_MTYPE_OFF] & v22_E_MT_MASK;
+ f_tx = !(s_ptr[v22_W_MTYPE_OFF] & v22_E_IS_RX);
actual_octets = pntoh16(&s_ptr[v22_W_OCTET_OFF]);
- vc_id = pntoh16(&s_ptr[v22_W_VCID_OFF]) & 0x3ff;
+ vc_id = pntoh16(&s_ptr[v22_W_VCID_OFF]) & v22_E_VCID_MASK;
flow_seq = s_ptr[v22_W_FLOWSEQ_OFF];
latency = (guint32)pcorey48tohll(&s_ptr[v22_W_LATVAL_OFF]);