aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dnp.c
diff options
context:
space:
mode:
authorGraham Bloice <graham.bloice@trihedral.com>2016-10-29 16:42:19 +0100
committerGraham Bloice <graham.bloice@trihedral.com>2016-10-29 16:58:01 +0000
commit1e1679db4671ce0745d516e9fb8dbd43a9677d05 (patch)
tree8af657ff7abb98ede69ada9c27ffdfaeba7ee88d /epan/dissectors/packet-dnp.c
parent23b79f9304e020fa96de699f4fcaa11044df08b7 (diff)
dnp3: fix indent and variable names
Change-Id: I86339a47f78c7b54e57896cc42184a27b5326cb0 Reviewed-on: https://code.wireshark.org/review/18563 Petri-Dish: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Diffstat (limited to 'epan/dissectors/packet-dnp.c')
-rw-r--r--epan/dissectors/packet-dnp.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/epan/dissectors/packet-dnp.c b/epan/dissectors/packet-dnp.c
index 93af56f301..e8479b788e 100644
--- a/epan/dissectors/packet-dnp.c
+++ b/epan/dissectors/packet-dnp.c
@@ -3253,18 +3253,18 @@ dissect_dnp3_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
proto_tree *al_tree;
guint8 tr_ctl, tr_seq;
gboolean tr_fir, tr_fin;
- guint8 *tmp, *tmp_ptr;
+ guint8 *al_buffer, *al_buffer_ptr;
guint8 data_len;
int data_offset;
gboolean crc_OK = FALSE;
tvbuff_t *next_tvb;
guint i;
- static const int * transport_flags[] = {
- &hf_dnp3_tr_fin,
- &hf_dnp3_tr_fir,
- &hf_dnp3_tr_seq,
- NULL
- };
+ static const int * transport_flags[] = {
+ &hf_dnp3_tr_fin,
+ &hf_dnp3_tr_fir,
+ &hf_dnp3_tr_seq,
+ NULL
+ };
/* get the transport layer byte */
tr_ctl = tvb_get_guint8(tvb, offset);
@@ -3286,8 +3286,8 @@ dissect_dnp3_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
/* XXX - check for dl_len <= 5 */
data_len = dl_len - 5;
- tmp = (guint8 *)wmem_alloc(pinfo->pool, data_len);
- tmp_ptr = tmp;
+ al_buffer = (guint8 *)wmem_alloc(pinfo->pool, data_len);
+ al_buffer_ptr = al_buffer;
i = 0;
data_offset = 1; /* skip the transport layer byte when assembling chunks */
while (data_len > 0)
@@ -3298,10 +3298,10 @@ dissect_dnp3_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
chk_size = MIN(data_len, AL_MAX_CHUNK_SIZE);
chk_ptr = tvb_get_ptr(tvb, offset, chk_size);
- memcpy(tmp_ptr, chk_ptr + data_offset, chk_size - data_offset);
+ memcpy(al_buffer_ptr, chk_ptr + data_offset, chk_size - data_offset);
calc_crc = calculateCRC(chk_ptr, chk_size);
offset += chk_size;
- tmp_ptr += chk_size - data_offset;
+ al_buffer_ptr += chk_size - data_offset;
act_crc = tvb_get_letohs(tvb, offset);
offset += 2;
crc_OK = calc_crc == act_crc;
@@ -3329,7 +3329,7 @@ dissect_dnp3_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
tvbuff_t *al_tvb;
gboolean save_fragmented;
- al_tvb = tvb_new_child_real_data(tvb, tmp, (guint) (tmp_ptr-tmp), (gint) (tmp_ptr-tmp));
+ al_tvb = tvb_new_child_real_data(tvb, al_buffer, (guint) (al_buffer_ptr-al_buffer), (gint) (al_buffer_ptr-al_buffer));
/* Check for fragmented packet */
save_fragmented = pinfo->fragmented;