summaryrefslogtreecommitdiff
path: root/wiretap
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-05-05 19:33:01 -0700
committerGuy Harris <guy@alum.mit.edu>2017-05-06 02:33:37 +0000
commit1247aaef83428c8e995eea6687379d02cd54929f (patch)
tree761b22790656bc6e9bc26cc1b85befb2ee0b8ae7 /wiretap
parent247484816619b176ba3d20e7546e37a448eb1961 (diff)
downloadwireshark-1247aaef83428c8e995eea6687379d02cd54929f.tar.gz
Set some variables in the "RF only" code path.
That should remove the need to initialize them, make it clearer what values are being used in the "RF only" case, and catch any cases where they don't get set in the "not just RF" case in the future. Change-Id: I10c3ecef608ed2f481111fb7bc32bb8494b68d27 Reviewed-on: https://code.wireshark.org/review/21536 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/vwr.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/wiretap/vwr.c b/wiretap/vwr.c
index ae4fc1ff51..436af62018 100644
--- a/wiretap/vwr.c
+++ b/wiretap/vwr.c
@@ -1816,7 +1816,7 @@ static gboolean vwr_read_s3_W_rec(vwr_t *vwr, struct wtap_pkthdr *phdr,
int stats_offset = 0;
const guint8 *s_start_ptr = NULL,*s_trail_ptr = NULL, *plcp_ptr, *m_ptr; /* stats & MPDU ptr */
guint32 msdu_length = 0, actual_octets = 0; /* octets in frame */
- guint8 l1p_1 = 0,l1p_2 = 0, plcp_type, rate_mcs_index, nss = 0; /* mod (CCK-L/CCK-S/OFDM) */
+ guint8 l1p_1 = 0,l1p_2 = 0, plcp_type, rate_mcs_index, nss; /* mod (CCK-L/CCK-S/OFDM) */
guint64 s_time = LL_ZERO, e_time = LL_ZERO; /* start/end */
/* times, nsec */
guint64 latency = LL_ZERO;
@@ -1834,7 +1834,7 @@ static gboolean vwr_read_s3_W_rec(vwr_t *vwr, struct wtap_pkthdr *phdr,
guint8 flow_seq =0,plcp_hdr_flag = 0,rf_id = 0; /* indicates plcp hdr info */
const guint8 *rf_ptr = NULL;
float rate;
- guint16 phyRate = 0;
+ guint16 phyRate;
/*
* The record data must be large enough to hold the statistics header,
@@ -1873,6 +1873,9 @@ static gboolean vwr_read_s3_W_rec(vwr_t *vwr, struct wtap_pkthdr *phdr,
data_ptr = ws_buffer_start_ptr(buf);
port_type = IS_TX << 4;
+
+ nss = 0;
+ phyRate = 0;
}
else {
/* Calculate the start of the statistics blocks in the buffer */