aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-11-28 12:18:07 -0800
committerGuy Harris <guy@alum.mit.edu>2015-11-28 20:18:38 +0000
commitff209f5ee6307c2f99c1eb1e86fa90a7fc9e43a5 (patch)
treee7e97f668fdb17dfc7384907656c61d12ace0189 /wiretap
parentdba17518dfd611f84e87a95143f1058e05bca9f8 (diff)
Make the rate tables static and const.
No need to put them on the stack and initialize them at the beginning of the routine. Change-Id: Id6332be186660c881cf37290f70d03cc77ac66be Reviewed-on: https://code.wireshark.org/review/12265 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/vwr.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/wiretap/vwr.c b/wiretap/vwr.c
index a699d8d6b9..179a0f64f9 100644
--- a/wiretap/vwr.c
+++ b/wiretap/vwr.c
@@ -2260,14 +2260,14 @@ guint64 get_signature_ts(const guint8 *m_ptr,int sig_off)
static float getRate( guint8 plcpType, guint8 mcsIndex, guint16 rflags, guint8 nss )
{
/* Rate conversion data */
- float canonical_rate_legacy[] = {1.0f, 2.0f, 5.5f, 11.0f, 6.0f, 9.0f, 12.0f, 18.0f, 24.0f, 36.0f, 48.0f, 54.0f};
+ static const float canonical_rate_legacy[] = {1.0f, 2.0f, 5.5f, 11.0f, 6.0f, 9.0f, 12.0f, 18.0f, 24.0f, 36.0f, 48.0f, 54.0f};
- int canonical_ndbps_20_ht[8] = {26, 52, 78, 104, 156, 208, 234, 260};
- int canonical_ndbps_40_ht[8] = {54, 108, 162, 216, 324, 432, 486, 540};
+ static const int canonical_ndbps_20_ht[8] = {26, 52, 78, 104, 156, 208, 234, 260};
+ static const int canonical_ndbps_40_ht[8] = {54, 108, 162, 216, 324, 432, 486, 540};
- int canonical_ndbps_20_vht[] = {26,52, 78, 104, 156, 208, 234, 260, 312};
- int canonical_ndbps_40_vht[] = {54, 108, 162, 216, 324, 432, 486, 540, 648, 720};
- int canonical_ndbps_80_vht[] = {117, 234, 351, 468, 702, 936, 1053, 1170, 1404, 1560};
+ static const int canonical_ndbps_20_vht[] = {26, 52, 78, 104, 156, 208, 234, 260, 312};
+ static const int canonical_ndbps_40_vht[] = {54, 108, 162, 216, 324, 432, 486, 540, 648, 720};
+ static const int canonical_ndbps_80_vht[] = {117, 234, 351, 468, 702, 936, 1053, 1170, 1404, 1560};
float symbol_tx_time, bitrate = 0.0f;