aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-scsi.c
diff options
context:
space:
mode:
authormorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>2011-01-16 20:51:21 +0000
committermorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>2011-01-16 20:51:21 +0000
commite7ea07c0bddf8f45ac652a040ce85eaf769a16aa (patch)
tree420d5401a47ed145c8aba98c7891e5f098f86e19 /epan/dissectors/packet-scsi.c
parent45393f35e39fa3e077c1d784cb47de0b4074ee27 (diff)
There's no need to pass the result of tvb_get_ptr() as the 'value' in
proto_tree_add_*(): just use proto_tree_add_item(). Replace some tvb_get_ptr()s with tvb_get_ephemeral_string() or tvb_get_const_stringz(). Use tvb_memeql() & tvb_memcmp(). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35558 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-scsi.c')
-rw-r--r--epan/dissectors/packet-scsi.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/epan/dissectors/packet-scsi.c b/epan/dissectors/packet-scsi.c
index abac8a0911..3145d70e27 100644
--- a/epan/dissectors/packet-scsi.c
+++ b/epan/dissectors/packet-scsi.c
@@ -326,7 +326,7 @@ static GHashTable *scsi_fragment_table = NULL;
static GHashTable *scsi_reassembled_table = NULL;
/*
- * Required by all commands
+ * Required by all commands
*/
const int *cdb_control_fields[6] = {
&hf_scsi_control_vendor_specific,
@@ -1429,7 +1429,7 @@ static const true_false_string scsi_all_tg_pt_tfs = {
static const true_false_string scsi_aptpl_tfs = {
"Active Persist Through Power Loss is set",
- "Active Persist Through Power Loss is not set"
+ "Active Persist Through Power Loss is not set"
};
static const true_false_string scsi_naca_tfs = {
@@ -3966,10 +3966,10 @@ dissect_spc_persistentreserveout (tvbuff_t *tvb, packet_info *pinfo _U_, proto_t
cdata->itlq->flags = tvb_get_guint8 (tvb, offset);
}
else if (isreq && !iscdb) {
- proto_tree_add_bytes (tree, hf_scsi_persresvout_reskey, tvb, offset,
- 8, tvb_get_ptr(tvb, 0, 8));
- proto_tree_add_bytes (tree, hf_scsi_persresvout_sareskey, tvb,
- offset +8, 8, tvb_get_ptr(tvb, offset + 8, 8));
+ proto_tree_add_item (tree, hf_scsi_persresvout_reskey, tvb, offset,
+ 8, ENC_NA);
+ proto_tree_add_item (tree, hf_scsi_persresvout_sareskey, tvb,
+ offset +8, 8, ENC_NA);
if (cdata->itlq->flags == 0x07) {
const int *persresv_fields[] = {
&hf_scsi_persresv_control_rsvd,
@@ -3977,9 +3977,9 @@ dissect_spc_persistentreserveout (tvbuff_t *tvb, packet_info *pinfo _U_, proto_t
&hf_scsi_persresv_control_aptpl,
NULL
};
- proto_tree_add_bytes (tree, hf_scsi_persresvout_obsolete, tvb,
- offset+16, 1, tvb_get_ptr(tvb, offset+16, 1));
- proto_tree_add_bitmask(tree, tvb, offset+17,
+ proto_tree_add_item (tree, hf_scsi_persresvout_obsolete, tvb,
+ offset+16, 1, ENC_NA);
+ proto_tree_add_bitmask(tree, tvb, offset+17,
hf_scsi_persresvout_control, ett_persresv_control,
persresv_fields, FALSE);
}
@@ -3993,9 +3993,9 @@ dissect_spc_persistentreserveout (tvbuff_t *tvb, packet_info *pinfo _U_, proto_t
NULL
};
- proto_tree_add_bytes (tree, hf_scsi_persresvout_obsolete, tvb,
- offset+16, 4, tvb_get_ptr(tvb, offset+16, 4));
- proto_tree_add_bitmask(tree, tvb, offset+20,
+ proto_tree_add_item (tree, hf_scsi_persresvout_obsolete, tvb,
+ offset+16, 4, ENC_NA);
+ proto_tree_add_bitmask(tree, tvb, offset+20,
hf_scsi_persresvout_control, ett_persresv_control,
persresv_fields, FALSE);
}
@@ -5019,7 +5019,7 @@ proto_register_scsi (void)
{"Reserved", "scsi.cdb.control.reserved", FT_UINT8, BASE_HEX, NULL,
0x38, NULL, HFILL}},
{ &hf_scsi_control_naca,
- {"NACA", "scsi.cdb.control.naca", FT_BOOLEAN, 8,
+ {"NACA", "scsi.cdb.control.naca", FT_BOOLEAN, 8,
TFS(&scsi_naca_tfs), 0x04, NULL, HFILL}},
{ &hf_scsi_control_obs1,
{"Obsolete", "scsi.cdb.control.obs1", FT_UINT8, BASE_HEX,
@@ -5028,7 +5028,7 @@ proto_register_scsi (void)
{"Obsolete", "scsi.cdb.control.obs2", FT_UINT8, BASE_HEX,
NULL, 0x01, NULL, HFILL}},
{ &hf_scsi_inq_control,
- {"Control", "scsi.cdb.inq.control", FT_UINT8, BASE_HEX, NULL, 0x0,
+ {"Control", "scsi.cdb.inq.control", FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL}},
{ &hf_scsi_inquiry_flags,
{"Inquiry Flags", "scsi.inquiry.flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL,
@@ -5226,7 +5226,7 @@ proto_register_scsi (void)
{"Reserved", "scsi.inquiry.control.reserved", FT_UINT8, BASE_HEX,
NULL, 0x38, NULL, HFILL}},
{ &hf_scsi_inq_control_naca,
- {"NACA", "scsi.inquiry.control.naca", FT_BOOLEAN, 8,
+ {"NACA", "scsi.inquiry.control.naca", FT_BOOLEAN, 8,
TFS(&scsi_naca_tfs), 0x04, NULL, HFILL}},
{ &hf_scsi_inq_control_obs1,
{"Obsolete", "scsi.inquiry.control.obs1", FT_UINT8, BASE_HEX,