aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-07-10 10:23:40 -0700
committerGuy Harris <guy@alum.mit.edu>2016-07-10 17:24:15 +0000
commited69bf3bc7fdbc679f7a331efabcb712823ceb14 (patch)
treea475bbfe42509e8014b2576a9a0636a39087e7ff
parentfac8f1f1bd4b0cb41bcce5e9777376ad3c119f45 (diff)
Remove a compiler warning some platforms give.
Some UN*Xes declare an index() function, that being the name strchr() originally had in V7 UNIX. This causes warnings from compilers if you have a variable named "index", so rename the variable. Change-Id: Ibb046005d1ef911ce0739ce70a0a55c13310cdf0 Reviewed-on: https://code.wireshark.org/review/16372 Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r--plugins/docsis/packet-dpd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/docsis/packet-dpd.c b/plugins/docsis/packet-dpd.c
index 3249b1a..b06618a 100644
--- a/plugins/docsis/packet-dpd.c
+++ b/plugins/docsis/packet-dpd.c
@@ -184,7 +184,7 @@ dissect_dpd_subcarrier_assignment_vector(tvbuff_t * tvb, proto_tree * tree, guin
proto_item *it;
proto_tree *subcarrier_assignment_vector_tree;
guint8 subcarrier_assignment_vector_oddness;
- gint32 index;
+ gint32 vector_index;
it = proto_tree_add_protocol_format (tree, proto_docsis_dpd, tvb, start-3, len+3, ".6 Subcarrier Assignment Vector");
subcarrier_assignment_vector_tree = proto_item_add_subtree (it, ett_docsis_dpd_tlv_subcarrier_assignment_vector);
@@ -196,12 +196,12 @@ dissect_dpd_subcarrier_assignment_vector(tvbuff_t * tvb, proto_tree * tree, guin
subcarrier_assignment_vector_oddness = (tvb_get_guint8(tvb, start) >> 7);
- for(index = 0; index < len; ++index)
+ for(vector_index = 0; vector_index < len; ++vector_index)
{
- proto_tree_add_item (subcarrier_assignment_vector_tree, hf_docsis_dpd_tlv_subc_assign_vector_modulation_odd, tvb, start + 2 + index, 1, ENC_BIG_ENDIAN);
- if (!((index == len -1) && subcarrier_assignment_vector_oddness))
+ proto_tree_add_item (subcarrier_assignment_vector_tree, hf_docsis_dpd_tlv_subc_assign_vector_modulation_odd, tvb, start + 2 + vector_index, 1, ENC_BIG_ENDIAN);
+ if (!((vector_index == len -1) && subcarrier_assignment_vector_oddness))
{
- proto_tree_add_item (subcarrier_assignment_vector_tree, hf_docsis_dpd_tlv_subc_assign_vector_modulation_even, tvb, start + 2 + index, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item (subcarrier_assignment_vector_tree, hf_docsis_dpd_tlv_subc_assign_vector_modulation_even, tvb, start + 2 + vector_index, 1, ENC_BIG_ENDIAN);
}
}
}