diff options
author | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2013-02-21 21:04:59 +0000 |
---|---|---|
committer | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2013-02-21 21:04:59 +0000 |
commit | c5a71b1006c2db26767af85f2918a3ae4ecf40cb (patch) | |
tree | 9e721eb2a05768a3fdb83b7f9f644ecfe6ab9311 /epan/dissectors/packet-btatt.c | |
parent | a3fca224722242f067324cdbadee13db6c11ba7c (diff) |
String passed to val_to_str() must have int format specifier (%u, %d, %x, and so on...).
Fix some cases (easy to grep) by call to val_to_str_const().
svn path=/trunk/; revision=47807
Diffstat (limited to 'epan/dissectors/packet-btatt.c')
-rw-r--r-- | epan/dissectors/packet-btatt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-btatt.c b/epan/dissectors/packet-btatt.c index f2021d6a26..368f4bcd0d 100644 --- a/epan/dissectors/packet-btatt.c +++ b/epan/dissectors/packet-btatt.c @@ -286,7 +286,7 @@ dissect_btatt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) opcode = tvb_get_guint8(tvb, 0); offset++; - col_append_fstr(pinfo->cinfo, COL_INFO, "%s", val_to_str(opcode, opcode_vals, "<unknown>")); + col_append_fstr(pinfo->cinfo, COL_INFO, "%s", val_to_str_const(opcode, opcode_vals, "<unknown>")); switch (opcode) { case 0x01: /* Error Response */ @@ -294,7 +294,7 @@ dissect_btatt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset++; proto_tree_add_item(st, hf_btatt_handle_in_error, tvb, offset, 2, ENC_LITTLE_ENDIAN); col_append_fstr(pinfo->cinfo, COL_INFO, " - %s, Handle: 0x%04x", - val_to_str(tvb_get_guint8(tvb, offset+2), error_vals, "<unknown>"), + val_to_str_const(tvb_get_guint8(tvb, offset+2), error_vals, "<unknown>"), tvb_get_letohs(tvb, offset)); offset += 2; proto_tree_add_item(st, hf_btatt_error_code, tvb, offset, 1, ENC_LITTLE_ENDIAN); @@ -518,7 +518,7 @@ dissect_btatt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case 0x18: /* Execute Write Request */ col_append_fstr(pinfo->cinfo, COL_INFO, ", %s", - val_to_str(tvb_get_guint8(tvb, offset), flags_vals, "<unknown>")); + val_to_str_const(tvb_get_guint8(tvb, offset), flags_vals, "<unknown>")); proto_tree_add_item(st, hf_btatt_flags, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; break; |