aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dvb-tot.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2013-03-14 14:42:12 +0000
committerBill Meier <wmeier@newsguy.com>2013-03-14 14:42:12 +0000
commit77376a2363be6fda0576876db550acfe412dd223 (patch)
tree794079ad93eb7f803d955d85b18ee37d0c331ef0 /epan/dissectors/packet-dvb-tot.c
parent8dfa2eac7e61a0d46c7b9e0f86a71252903c1ee5 (diff)
Change "4 space tabs" indentation to use "4 spaces" indentation.
Also: - remove some unneeded initializers; - remove several unneeded 'col_clear()' calls; - guint8 --> guint to prevent a possible overflow; - reformat for style in some cases. svn path=/trunk/; revision=48297
Diffstat (limited to 'epan/dissectors/packet-dvb-tot.c')
-rw-r--r--epan/dissectors/packet-dvb-tot.c110
1 files changed, 55 insertions, 55 deletions
diff --git a/epan/dissectors/packet-dvb-tot.c b/epan/dissectors/packet-dvb-tot.c
index d4219890a8..494f521bfb 100644
--- a/epan/dissectors/packet-dvb-tot.c
+++ b/epan/dissectors/packet-dvb-tot.c
@@ -39,50 +39,50 @@ static int hf_dvb_tot_descriptors_loop_length = -1;
static gint ett_dvb_tot = -1;
-#define DVB_TOT_TID 0x73
+#define DVB_TOT_TID 0x73
-#define DVB_TOT_RESERVED_MASK 0xF000
-#define DVB_TOT_DESCRIPTORS_LOOP_LENGTH_MASK 0x0FFF
+#define DVB_TOT_RESERVED_MASK 0xF000
+#define DVB_TOT_DESCRIPTORS_LOOP_LENGTH_MASK 0x0FFF
static void
dissect_dvb_tot(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- guint offset = 0;
- guint descriptor_len, descriptor_end;
+ guint offset = 0;
+ guint descriptor_len, descriptor_end;
- proto_item *ti;
- proto_tree *dvb_tot_tree;
+ proto_item *ti;
+ proto_tree *dvb_tot_tree;
- nstime_t utc_time;
+ nstime_t utc_time;
- col_set_str(pinfo->cinfo, COL_INFO, "Time Offset Table (TOT)");
+ col_set_str(pinfo->cinfo, COL_INFO, "Time Offset Table (TOT)");
- ti = proto_tree_add_item(tree, proto_dvb_tot, tvb, offset, -1, ENC_NA);
- dvb_tot_tree = proto_item_add_subtree(ti, ett_dvb_tot);
+ ti = proto_tree_add_item(tree, proto_dvb_tot, tvb, offset, -1, ENC_NA);
+ dvb_tot_tree = proto_item_add_subtree(ti, ett_dvb_tot);
- offset += packet_mpeg_sect_header(tvb, offset, dvb_tot_tree, NULL, NULL);
+ offset += packet_mpeg_sect_header(tvb, offset, dvb_tot_tree, NULL, NULL);
- if (packet_mpeg_sect_mjd_to_utc_time(tvb, offset, &utc_time) < 0) {
- proto_tree_add_text(dvb_tot_tree, tvb, offset, 5, "UTC Time : Unparseable time");
- } else {
- proto_tree_add_time_format(dvb_tot_tree, hf_dvb_tot_utc_time, tvb, offset, 5, &utc_time,
- "UTC Time : %s UTC", abs_time_to_str(&utc_time, ABSOLUTE_TIME_UTC, FALSE));
- }
+ if (packet_mpeg_sect_mjd_to_utc_time(tvb, offset, &utc_time) < 0) {
+ proto_tree_add_text(dvb_tot_tree, tvb, offset, 5, "UTC Time : Unparseable time");
+ } else {
+ proto_tree_add_time_format(dvb_tot_tree, hf_dvb_tot_utc_time, tvb, offset, 5, &utc_time,
+ "UTC Time : %s UTC", abs_time_to_str(&utc_time, ABSOLUTE_TIME_UTC, FALSE));
+ }
- offset += 5;
+ offset += 5;
- descriptor_len = tvb_get_ntohs(tvb, offset) & DVB_TOT_DESCRIPTORS_LOOP_LENGTH_MASK;
- proto_tree_add_item(dvb_tot_tree, hf_dvb_tot_reserved, tvb, offset, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item(dvb_tot_tree, hf_dvb_tot_descriptors_loop_length, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ descriptor_len = tvb_get_ntohs(tvb, offset) & DVB_TOT_DESCRIPTORS_LOOP_LENGTH_MASK;
+ proto_tree_add_item(dvb_tot_tree, hf_dvb_tot_reserved, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(dvb_tot_tree, hf_dvb_tot_descriptors_loop_length, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- descriptor_end = offset + descriptor_len;
- while (offset < descriptor_end)
- offset += proto_mpeg_descriptor_dissect(tvb, offset, dvb_tot_tree);
+ descriptor_end = offset + descriptor_len;
+ while (offset < descriptor_end)
+ offset += proto_mpeg_descriptor_dissect(tvb, offset, dvb_tot_tree);
- offset += packet_mpeg_sect_crc(tvb, pinfo, dvb_tot_tree, 0, offset);
- proto_item_set_len(ti, offset);
+ offset += packet_mpeg_sect_crc(tvb, pinfo, dvb_tot_tree, 0, offset);
+ proto_item_set_len(ti, offset);
}
@@ -90,43 +90,43 @@ void
proto_register_dvb_tot(void)
{
- static hf_register_info hf[] = {
+ static hf_register_info hf[] = {
- { &hf_dvb_tot_utc_time, {
- "UTC Time", "dvb_tot.utc_time",
- FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0, NULL, HFILL
- } },
+ { &hf_dvb_tot_utc_time, {
+ "UTC Time", "dvb_tot.utc_time",
+ FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0, NULL, HFILL
+ } },
- { &hf_dvb_tot_reserved, {
- "Reserved", "dvb_tot.reserved",
- FT_UINT16, BASE_HEX, NULL, DVB_TOT_RESERVED_MASK, NULL, HFILL
- } },
+ { &hf_dvb_tot_reserved, {
+ "Reserved", "dvb_tot.reserved",
+ FT_UINT16, BASE_HEX, NULL, DVB_TOT_RESERVED_MASK, NULL, HFILL
+ } },
- { &hf_dvb_tot_descriptors_loop_length, {
- "Descriptors Loop Length", "dvb_tot.descr_loop_len",
- FT_UINT16, BASE_DEC, NULL, DVB_TOT_DESCRIPTORS_LOOP_LENGTH_MASK, NULL, HFILL
- } }
- };
+ { &hf_dvb_tot_descriptors_loop_length, {
+ "Descriptors Loop Length", "dvb_tot.descr_loop_len",
+ FT_UINT16, BASE_DEC, NULL, DVB_TOT_DESCRIPTORS_LOOP_LENGTH_MASK, NULL, HFILL
+ } }
+ };
- static gint *ett[] = {
- &ett_dvb_tot
- };
+ static gint *ett[] = {
+ &ett_dvb_tot
+ };
- proto_dvb_tot = proto_register_protocol("DVB Time Offset Table", "DVB TOT", "dvb_tot");
+ proto_dvb_tot = proto_register_protocol("DVB Time Offset Table", "DVB TOT", "dvb_tot");
- proto_register_field_array(proto_dvb_tot, hf, array_length(hf));
- proto_register_subtree_array(ett, array_length(ett));
+ proto_register_field_array(proto_dvb_tot, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
}
void proto_reg_handoff_dvb_tot(void)
{
- dissector_handle_t dvb_tot_handle;
+ dissector_handle_t dvb_tot_handle;
- dvb_tot_handle = create_dissector_handle(dissect_dvb_tot, proto_dvb_tot);
+ dvb_tot_handle = create_dissector_handle(dissect_dvb_tot, proto_dvb_tot);
- dissector_add_uint("mpeg_sect.tid", DVB_TOT_TID, dvb_tot_handle);
+ dissector_add_uint("mpeg_sect.tid", DVB_TOT_TID, dvb_tot_handle);
}
/*
@@ -134,10 +134,10 @@ void proto_reg_handoff_dvb_tot(void)
*
* Local variables:
* c-basic-offset: 4
- * tab-width: 4
- * indent-tabs-mode: t
+ * tab-width: 8
+ * indent-tabs-mode: nil
* End:
*
- * vi: set shiftwidth=4 tabstop=4 noexpandtab:
- * :indentSize=4:tabSize=4:noTabs=false:
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
*/