aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-lapd.c
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2021-08-29 01:33:25 -0700
committerWireshark GitLab Utility <gerald+gitlab-utility@wireshark.org>2021-08-29 08:34:46 +0000
commitbce7cbf52967a78319251f4d66fd0a21424c4504 (patch)
tree0fe2875486742920f0d14419df11899c44b3ba6b /epan/dissectors/packet-lapd.c
parente9533a3f5d96fe01b99feffe1a04e037f5fa7239 (diff)
lapd: clean up variable names, remove unnecessary initialization.
Use "flags" for the OPT_PKT_FLAGS option value, as we do elsewhere. Use "lapd_flags" for the variable holding the LAPD flags. We don't need to initialize flags, as we extract the OPT_PKT_FLAGS option into it immediately after initializing it (if the attempt to get that option fails, it's not set, but it's not used, either).
Diffstat (limited to 'epan/dissectors/packet-lapd.c')
-rw-r--r--epan/dissectors/packet-lapd.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/epan/dissectors/packet-lapd.c b/epan/dissectors/packet-lapd.c
index df98da0978..3f1f9350b1 100644
--- a/epan/dissectors/packet-lapd.c
+++ b/epan/dissectors/packet-lapd.c
@@ -481,8 +481,8 @@ dissect_lapd_phdr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat
static int
dissect_lapd_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
{
- guint32 flags = 0;
- guint32 pack_flags = 0;
+ guint32 flags;
+ guint32 lapd_flags = 0;
/*
* If we have direction flags, we have a direction;
@@ -490,22 +490,22 @@ dissect_lapd_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da
* "inbound" packets are presumed to be Network->User.
* Other packets, we have no idea.
*/
- if (WTAP_OPTTYPE_SUCCESS == wtap_block_get_uint32_option_value(pinfo->rec->block, OPT_PKT_FLAGS, &pack_flags)) {
- switch (PACK_FLAGS_DIRECTION(pack_flags)) {
+ if (WTAP_OPTTYPE_SUCCESS == wtap_block_get_uint32_option_value(pinfo->rec->block, OPT_PKT_FLAGS, &flags)) {
+ switch (PACK_FLAGS_DIRECTION(flags)) {
case PACK_FLAGS_DIRECTION_OUTBOUND:
- flags |= LAPD_HAS_DIRECTION | LAPD_USER_TO_NETWORK;
+ lapd_flags |= LAPD_HAS_DIRECTION | LAPD_USER_TO_NETWORK;
break;
case PACK_FLAGS_DIRECTION_INBOUND:
- flags |= LAPD_HAS_DIRECTION;
+ lapd_flags |= LAPD_HAS_DIRECTION;
break;
default:
break;
}
}
- dissect_lapd_full(tvb, pinfo, tree, flags);
+ dissect_lapd_full(tvb, pinfo, tree, lapd_flags);
return tvb_captured_length(tvb);
}