aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gsm_a_bssmap.c
diff options
context:
space:
mode:
authorDario Lombardo <lomato@gmail.com>2020-01-10 15:42:58 +0100
committerAnders Broman <a.broman58@gmail.com>2020-01-21 04:44:31 +0000
commit084a887a30b78a3f4f42aa35a15049c251adfcfa (patch)
treea28ee4be438301451dbb959ad9817ea563f5a878 /epan/dissectors/packet-gsm_a_bssmap.c
parent567991b8fb7f1524d4860273ec0c01fd928bf353 (diff)
Fix compilation with gcc-9.
gcc-9 spotted some NULL pointer usages. Bug: 16319 Change-Id: I3e4ac57705f1852c43299f5e924fc642a2c56a3a Reviewed-on: https://code.wireshark.org/review/35733 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-gsm_a_bssmap.c')
-rw-r--r--epan/dissectors/packet-gsm_a_bssmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-gsm_a_bssmap.c b/epan/dissectors/packet-gsm_a_bssmap.c
index c9aadd49d7..7547e949f5 100644
--- a/epan/dissectors/packet-gsm_a_bssmap.c
+++ b/epan/dissectors/packet-gsm_a_bssmap.c
@@ -1223,7 +1223,6 @@ bssmap_dissect_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint3
{
guint8 oct;
guint32 curr_offset;
- const gchar *str = NULL;
curr_offset = offset;
@@ -1263,7 +1262,8 @@ bssmap_dissect_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint3
curr_offset++;
if (add_string)
- g_snprintf(add_string, string_len, " - (%u) %s", oct & 0x7f, str);
+ g_snprintf(add_string, string_len, " - (%u) %s", oct & 0x7f,
+ rval_to_str_const(oct & 0x7f, gsm_a_bssap_cause_rvals, "Unknown"));
}
EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_bssmap_extraneous_data);