aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-canopen.c
diff options
context:
space:
mode:
authorMartin Mathieson <martin.mathieson@keysight.com>2023-04-23 13:21:01 +0100
committerMartin Mathieson <martin.r.mathieson@googlemail.com>2023-04-23 15:27:16 +0000
commite2758f18bbed96b09b9c815e81fbfac632149342 (patch)
tree9d73f64e2dd292b5e952c5812c77700d009ae010 /epan/dissectors/packet-canopen.c
parent8641f42d98cd5fad913540260526e727fb257b1f (diff)
More val_to_str()-related fixes
Diffstat (limited to 'epan/dissectors/packet-canopen.c')
-rw-r--r--epan/dissectors/packet-canopen.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-canopen.c b/epan/dissectors/packet-canopen.c
index 4a489738f2..4f321b1298 100644
--- a/epan/dissectors/packet-canopen.c
+++ b/epan/dissectors/packet-canopen.c
@@ -1121,7 +1121,7 @@ dissect_lss(tvbuff_t *tvb, packet_info *pinfo, proto_tree *canopen_type_tree, gu
case LSS_CS_IDENT_REMOTE_SERIAL_LOW:
case LSS_CS_IDENT_REMOTE_SERIAL_HIGH:
col_append_fstr(pinfo->cinfo, COL_INFO, ", %s 0x%08x",
- val_to_str(lss_cs, lss_id_remote_slave, "(Unknown)"), tvb_get_letohl(tvb, offset));
+ val_to_str_const(lss_cs, lss_id_remote_slave, "(Unknown)"), tvb_get_letohl(tvb, offset));
proto_tree_add_item(canopen_type_tree,
*hf_canopen_lss_addr_ident[lss_cs - LSS_CS_IDENT_REMOTE_VENDOR], tvb, offset, 4, ENC_LITTLE_ENDIAN);
@@ -1203,7 +1203,7 @@ dissect_lss(tvbuff_t *tvb, packet_info *pinfo, proto_tree *canopen_type_tree, gu
case LSS_CS_INQ_REV_NUMBER:
case LSS_CS_INQ_SERIAL_NUMBER:
col_append_fstr(pinfo->cinfo, COL_INFO,
- ", %s 0x%08x", val_to_str(lss_cs, lss_inquire_id, "(Unknown)"), tvb_get_letohl(tvb, offset));
+ ", %s 0x%08x", val_to_str_const(lss_cs, lss_inquire_id, "(Unknown)"), tvb_get_letohl(tvb, offset));
proto_tree_add_item(canopen_type_tree,
*hf_canopen_lss_addr_inquire[lss_cs - LSS_CS_INQ_VENDOR_ID], tvb, offset, 4, ENC_LITTLE_ENDIAN);
@@ -1212,7 +1212,7 @@ dissect_lss(tvbuff_t *tvb, packet_info *pinfo, proto_tree *canopen_type_tree, gu
break;
case LSS_CS_INQ_NODE_ID:
col_append_fstr(pinfo->cinfo, COL_INFO,
- ", %s 0x%08x", val_to_str(lss_cs, lss_inquire_id, "(Unknown)"), tvb_get_letohl(tvb, offset));
+ ", %s 0x%08x", val_to_str_const(lss_cs, lss_inquire_id, "(Unknown)"), tvb_get_letohl(tvb, offset));
proto_tree_add_item(canopen_type_tree,
hf_canopen_lss_nid, tvb, offset, 1, ENC_LITTLE_ENDIAN);
@@ -1336,7 +1336,7 @@ dissect_canopen(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
break;
case MT_NMT_ERR_CTRL:
if (tvb_reported_length(tvb) > 0) {
- col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", val_to_str(tvb_get_bits8(tvb, 1, 7), nmt_guard_state, "(Unknown)"));
+ col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", val_to_str_const(tvb_get_bits8(tvb, 1, 7), nmt_guard_state, "(Unknown)"));
proto_tree_add_item(canopen_type_tree,
hf_canopen_nmt_guard_toggle, tvb, offset, 1, ENC_LITTLE_ENDIAN);