diff options
author | Michael Mann <mmann78@netscape.net> | 2013-09-15 01:48:30 +0000 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2013-09-15 01:48:30 +0000 |
commit | b38ee917b1953104c615056481d6df008ae94b53 (patch) | |
tree | 55024f9c53f083dc056540b6d887fc4550064008 /epan/dissectors/packet-nfs.c | |
parent | a17cf67635c6e190c174bc131707804edca5c8f4 (diff) |
Convert proto_tree_add_uint_format to proto_tree_add_uint_format_value if hf_ field name is the first part of the formatted string. This was done with a perl script on the dissectors directory (packet-*.c), followed by manual inspection of the output. The manual inspection yielded a few cases that really should have been proto_tree_add_uint or proto_tree_add_item, so I updated them accordingly.
The script didn't catch as many as I would have liked, but it's a start.
The most common (ab)use of proto_tree_add_uint_format was for appending strings to CRC/checksum values to note good or bad CRC/checksum.
svn path=/trunk/; revision=52045
Diffstat (limited to 'epan/dissectors/packet-nfs.c')
-rw-r--r-- | epan/dissectors/packet-nfs.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/epan/dissectors/packet-nfs.c b/epan/dissectors/packet-nfs.c index 96218b3a85..ced348c862 100644 --- a/epan/dissectors/packet-nfs.c +++ b/epan/dissectors/packet-nfs.c @@ -1914,12 +1914,10 @@ dissect_fhandle_data_NETAPP_GX_v3(tvbuff_t* tvb, packet_info *pinfo _U_, proto_t offset+11, 1, flags); proto_tree_add_boolean(field_tree, hf_nfs3_gxfh_sfhflags_streamdir, tvb, offset+11, 1, flags); - proto_tree_add_uint_format(field_tree, hf_nfs3_gxfh_spinfid, tvb, - offset+12, 4, spinfile_id, - "spin file id: 0x%08x (%u)", spinfile_id, spinfile_id); - proto_tree_add_uint_format(field_tree, hf_nfs3_gxfh_spinfuid, tvb, - offset+16, 4, spinfile_id, - "spin file unique id: 0x%08x (%u)", spinfile_uid, spinfile_uid); + proto_tree_add_uint(field_tree, hf_nfs3_gxfh_spinfid, tvb, + offset+12, 4, spinfile_id); + proto_tree_add_uint(field_tree, hf_nfs3_gxfh_spinfuid, tvb, + offset+16, 4, spinfile_id); /* = spin file handle (mount point) = */ local_dsid = tvb_get_letohl(tvb, offset+20); @@ -1971,12 +1969,10 @@ dissect_fhandle_data_NETAPP_GX_v3(tvbuff_t* tvb, packet_info *pinfo _U_, proto_t offset+27, 1, flags); proto_tree_add_boolean(field_tree, hf_nfs3_gxfh_sfhflags_streamdir, tvb, offset+27, 1, flags); - proto_tree_add_uint_format(field_tree, hf_nfs3_gxfh_spinfid, tvb, - offset+28, 4, spinfile_id, - "spin file id: 0x%08x (%u)", spinfile_id, spinfile_id); - proto_tree_add_uint_format(field_tree, hf_nfs3_gxfh_spinfuid, tvb, - offset+32, 4, spinfile_id, - "spin file unique id: 0x%08x (%u)", spinfile_uid, spinfile_uid); + proto_tree_add_uint(field_tree, hf_nfs3_gxfh_spinfid, tvb, + offset+28, 4, spinfile_id); + proto_tree_add_uint(field_tree, hf_nfs3_gxfh_spinfuid, tvb, + offset+32, 4, spinfile_id); /* = export point id = */ export_id = tvb_get_letohl(tvb, offset+36); proto_tree_add_uint_format(tree, hf_nfs3_gxfh_exportptid, tvb, @@ -11779,11 +11775,11 @@ proto_register_nfs(void) TFS(&tfs_set_notset), SPINNP_FH_FLAG_STREAMDIR_MASK, NULL, HFILL }}, { &hf_nfs3_gxfh_spinfid, { - "spin file id", "nfs.gxfh3.spinfid", FT_UINT32, BASE_HEX, + "spin file id", "nfs.gxfh3.spinfid", FT_UINT32, BASE_HEX_DEC, NULL, 0, NULL, HFILL }}, { &hf_nfs3_gxfh_spinfuid, { - "spin file unique id", "nfs.gxfh3.spinfuid", FT_UINT32, BASE_HEX, + "spin file unique id", "nfs.gxfh3.spinfuid", FT_UINT32, BASE_HEX_DEC, NULL, 0, NULL, HFILL }}, { &hf_nfs3_gxfh_exportptid, { |