diff options
author | Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> | 2009-08-09 06:26:46 +0000 |
---|---|---|
committer | Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> | 2009-08-09 06:26:46 +0000 |
commit | e971354a546be5efc284c72e49689a2e337bc198 (patch) | |
tree | 13a89a4bf6146b1bbe2afde85c3544eee651ca78 /plugins | |
parent | fc067ab9104d12f3683c8f112250b8523260b77f (diff) |
Don't guard col_set_str (COL_PROTOCOL) with col_check
svn path=/trunk/; revision=29340
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/docsis/packet-docsis.c | 3 | ||||
-rw-r--r-- | plugins/docsis/packet-macmgmt.c | 3 | ||||
-rw-r--r-- | plugins/ethercat/packet-ams.c | 3 | ||||
-rw-r--r-- | plugins/ethercat/packet-ethercat-datagram.c | 3 | ||||
-rw-r--r-- | plugins/ethercat/packet-ioraw.c | 3 | ||||
-rw-r--r-- | plugins/ethercat/packet-nv.c | 3 | ||||
-rw-r--r-- | plugins/giop/packet-coseventcomm.c | 3 | ||||
-rw-r--r-- | plugins/giop/packet-cosnaming.c | 3 | ||||
-rw-r--r-- | plugins/giop/packet-parlay.c | 3 | ||||
-rw-r--r-- | plugins/giop/packet-tango.c | 3 | ||||
-rw-r--r-- | plugins/gryphon/packet-gryphon.c | 3 | ||||
-rw-r--r-- | plugins/irda/packet-ircomm.c | 6 | ||||
-rw-r--r-- | plugins/irda/packet-irda.c | 18 | ||||
-rw-r--r-- | plugins/profinet/packet-pn-mrp.c | 3 | ||||
-rw-r--r-- | plugins/sercosiii/packet-sercosiii_1v1.c | 3 | ||||
-rw-r--r-- | plugins/sercosiii/packet-sercosiii_1v1_at.c | 3 | ||||
-rw-r--r-- | plugins/sercosiii/packet-sercosiii_1v1_mdt.c | 3 |
17 files changed, 23 insertions, 46 deletions
diff --git a/plugins/docsis/packet-docsis.c b/plugins/docsis/packet-docsis.c index 1876181b92..984bedce77 100644 --- a/plugins/docsis/packet-docsis.c +++ b/plugins/docsis/packet-docsis.c @@ -371,8 +371,7 @@ dissect_docsis (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) } /* Make entries in Protocol column and Info column on summary display */ - if (check_col (pinfo->cinfo, COL_PROTOCOL)) - col_set_str (pinfo->cinfo, COL_PROTOCOL, "DOCSIS"); + col_set_str (pinfo->cinfo, COL_PROTOCOL, "DOCSIS"); if (check_col (pinfo->cinfo, COL_INFO)) { diff --git a/plugins/docsis/packet-macmgmt.c b/plugins/docsis/packet-macmgmt.c index 1ecb4f2b20..c8afcb42ba 100644 --- a/plugins/docsis/packet-macmgmt.c +++ b/plugins/docsis/packet-macmgmt.c @@ -133,8 +133,7 @@ dissect_macmgmt (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) proto_tree *mgt_hdr_tree; tvbuff_t *payload_tvb; guint8 type; - if (check_col (pinfo->cinfo, COL_PROTOCOL)) - col_set_str (pinfo->cinfo, COL_PROTOCOL, "DOCSIS MGMT"); + col_set_str (pinfo->cinfo, COL_PROTOCOL, "DOCSIS MGMT"); if (check_col (pinfo->cinfo, COL_INFO)) col_clear (pinfo->cinfo, COL_INFO); diff --git a/plugins/ethercat/packet-ams.c b/plugins/ethercat/packet-ams.c index 5dd83278b9..44b8814c10 100644 --- a/plugins/ethercat/packet-ams.c +++ b/plugins/ethercat/packet-ams.c @@ -394,8 +394,7 @@ static void dissect_ams(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) char szText[200]; int nMax = sizeof(szText)-1; - if (check_col(pinfo->cinfo, COL_PROTOCOL)) - col_set_str(pinfo->cinfo, COL_PROTOCOL, "AMS"); + col_set_str(pinfo->cinfo, COL_PROTOCOL, "AMS"); if (check_col(pinfo->cinfo, COL_INFO)) col_clear(pinfo->cinfo, COL_INFO); diff --git a/plugins/ethercat/packet-ethercat-datagram.c b/plugins/ethercat/packet-ethercat-datagram.c index a737e33fec..02ec0a28cc 100644 --- a/plugins/ethercat/packet-ethercat-datagram.c +++ b/plugins/ethercat/packet-ethercat-datagram.c @@ -462,8 +462,7 @@ static void dissect_ecat_datagram(tvbuff_t *tvb, packet_info *pinfo, proto_tree guint datagram_padding_bytes = 0; EcParserHDR ecHdr; - if (check_col(pinfo->cinfo, COL_PROTOCOL)) - col_set_str(pinfo->cinfo, COL_PROTOCOL, "ECAT"); + col_set_str(pinfo->cinfo, COL_PROTOCOL, "ECAT"); if (check_col(pinfo->cinfo, COL_INFO)) col_clear(pinfo->cinfo, COL_INFO); diff --git a/plugins/ethercat/packet-ioraw.c b/plugins/ethercat/packet-ioraw.c index a79feea04a..780451181e 100644 --- a/plugins/ethercat/packet-ioraw.c +++ b/plugins/ethercat/packet-ioraw.c @@ -69,8 +69,7 @@ static void dissect_ioraw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) guint ioraw_length = tvb_reported_length(tvb); - if (check_col(pinfo->cinfo, COL_PROTOCOL)) - col_set_str(pinfo->cinfo, COL_PROTOCOL, "IO-RAW"); + col_set_str(pinfo->cinfo, COL_PROTOCOL, "IO-RAW"); if (check_col(pinfo->cinfo, COL_INFO)) col_clear(pinfo->cinfo, COL_INFO); diff --git a/plugins/ethercat/packet-nv.c b/plugins/ethercat/packet-nv.c index 6b42bac522..2bd6fed5f7 100644 --- a/plugins/ethercat/packet-nv.c +++ b/plugins/ethercat/packet-nv.c @@ -110,8 +110,7 @@ static void dissect_nv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) gint i; - if (check_col(pinfo->cinfo, COL_PROTOCOL)) - col_set_str(pinfo->cinfo, COL_PROTOCOL, "TC-NV"); + col_set_str(pinfo->cinfo, COL_PROTOCOL, "TC-NV"); if (check_col(pinfo->cinfo, COL_INFO)) col_clear(pinfo->cinfo, COL_INFO); diff --git a/plugins/giop/packet-coseventcomm.c b/plugins/giop/packet-coseventcomm.c index a11454c801..882e907072 100644 --- a/plugins/giop/packet-coseventcomm.c +++ b/plugins/giop/packet-coseventcomm.c @@ -605,8 +605,7 @@ static proto_tree *start_dissecting(tvbuff_t *tvb, packet_info *pinfo, proto_tre proto_item *ti = NULL; proto_tree *tree = NULL; /* init later, inside if(tree) */ - if (check_col(pinfo->cinfo, COL_PROTOCOL)) - col_set_str(pinfo->cinfo, COL_PROTOCOL, "COSEVENTCOMM"); + col_set_str(pinfo->cinfo, COL_PROTOCOL, "COSEVENTCOMM"); /* * Do not clear COL_INFO, as nothing is being written there by diff --git a/plugins/giop/packet-cosnaming.c b/plugins/giop/packet-cosnaming.c index daff120511..8df1757462 100644 --- a/plugins/giop/packet-cosnaming.c +++ b/plugins/giop/packet-cosnaming.c @@ -1552,8 +1552,7 @@ static proto_tree *start_dissecting(tvbuff_t *tvb, packet_info *pinfo, proto_tre proto_item *ti = NULL; proto_tree *tree = NULL; /* init later, inside if(tree) */ - if (check_col(pinfo->cinfo, COL_PROTOCOL)) - col_set_str(pinfo->cinfo, COL_PROTOCOL, "COSNAMING"); + col_set_str(pinfo->cinfo, COL_PROTOCOL, "COSNAMING"); /* * Do not clear COL_INFO, as nothing is being written there by diff --git a/plugins/giop/packet-parlay.c b/plugins/giop/packet-parlay.c index dad209aab9..a457eb13a6 100644 --- a/plugins/giop/packet-parlay.c +++ b/plugins/giop/packet-parlay.c @@ -101295,8 +101295,7 @@ static proto_tree *start_dissecting(tvbuff_t *tvb, packet_info *pinfo, proto_tre proto_item *ti = NULL; proto_tree *tree = NULL; /* init later, inside if(tree) */ - if (check_col(pinfo->cinfo, COL_PROTOCOL)) - col_set_str(pinfo->cinfo, COL_PROTOCOL, "PARLAY"); + col_set_str(pinfo->cinfo, COL_PROTOCOL, "PARLAY"); /* * Do not clear COL_INFO, as nothing is being written there by diff --git a/plugins/giop/packet-tango.c b/plugins/giop/packet-tango.c index faebb7e073..54a8920a3f 100644 --- a/plugins/giop/packet-tango.c +++ b/plugins/giop/packet-tango.c @@ -4231,8 +4231,7 @@ static proto_tree *start_dissecting(tvbuff_t *tvb, packet_info *pinfo, proto_tre proto_item *ti = NULL; proto_tree *tree = NULL; /* init later, inside if(tree) */ - if (check_col(pinfo->cinfo, COL_PROTOCOL)) - col_set_str(pinfo->cinfo, COL_PROTOCOL, "TANGO"); + col_set_str(pinfo->cinfo, COL_PROTOCOL, "TANGO"); /* * Do not clear COL_INFO, as nothing is being written there by diff --git a/plugins/gryphon/packet-gryphon.c b/plugins/gryphon/packet-gryphon.c index 25830dfc06..6152c674f4 100644 --- a/plugins/gryphon/packet-gryphon.c +++ b/plugins/gryphon/packet-gryphon.c @@ -210,8 +210,7 @@ dissect_gryphon_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 flags; if (!is_msgresp_add) { - if (check_col(pinfo->cinfo, COL_PROTOCOL)) - col_set_str(pinfo->cinfo, COL_PROTOCOL, "Gryphon"); + col_set_str(pinfo->cinfo, COL_PROTOCOL, "Gryphon"); if (check_col(pinfo->cinfo, COL_INFO)) col_clear(pinfo->cinfo, COL_INFO); } diff --git a/plugins/irda/packet-ircomm.c b/plugins/irda/packet-ircomm.c index 8f4790f5f8..a2340f42ba 100644 --- a/plugins/irda/packet-ircomm.c +++ b/plugins/irda/packet-ircomm.c @@ -177,8 +177,7 @@ static void dissect_cooked_ircomm(tvbuff_t* tvb, packet_info* pinfo, proto_tree* return; /* Make entries in Protocol column on summary display */ - if (check_col(pinfo->cinfo, COL_PROTOCOL)) - col_set_str(pinfo->cinfo, COL_PROTOCOL, "IrCOMM"); + col_set_str(pinfo->cinfo, COL_PROTOCOL, "IrCOMM"); clen = tvb_get_guint8(tvb, offset); @@ -232,8 +231,7 @@ static void dissect_raw_ircomm(tvbuff_t* tvb, packet_info* pinfo, proto_tree* ro return; /* Make entries in Protocol column on summary display */ - if (check_col(pinfo->cinfo, COL_PROTOCOL)) - col_set_str(pinfo->cinfo, COL_PROTOCOL, "IrCOMM"); + col_set_str(pinfo->cinfo, COL_PROTOCOL, "IrCOMM"); if (check_col(pinfo->cinfo, COL_INFO)) { diff --git a/plugins/irda/packet-irda.c b/plugins/irda/packet-irda.c index 9b16b2219f..2d4a56f1fb 100644 --- a/plugins/irda/packet-irda.c +++ b/plugins/irda/packet-irda.c @@ -469,8 +469,7 @@ static unsigned dissect_ttp(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root, return 0; /* Make entries in Protocol column on summary display */ - if (check_col(pinfo->cinfo, COL_PROTOCOL)) - col_set_str(pinfo->cinfo, COL_PROTOCOL, "TTP"); + col_set_str(pinfo->cinfo, COL_PROTOCOL, "TTP"); head = tvb_get_guint8(tvb, offset); @@ -530,8 +529,7 @@ static void dissect_iap_request(tvbuff_t* tvb, packet_info* pinfo, proto_tree* r return; /* Make entries in Protocol column on summary display */ - if (check_col(pinfo->cinfo, COL_PROTOCOL)) - col_set_str(pinfo->cinfo, COL_PROTOCOL, "IAP"); + col_set_str(pinfo->cinfo, COL_PROTOCOL, "IAP"); op = tvb_get_guint8(tvb, offset) & IAP_OP; @@ -696,8 +694,7 @@ static void dissect_iap_result(tvbuff_t* tvb, packet_info* pinfo, proto_tree* ro return; /* Make entries in Protocol column on summary display */ - if (check_col(pinfo->cinfo, COL_PROTOCOL)) - col_set_str(pinfo->cinfo, COL_PROTOCOL, "IAP"); + col_set_str(pinfo->cinfo, COL_PROTOCOL, "IAP"); op = tvb_get_guint8(tvb, offset) & IAP_OP; retcode = tvb_get_guint8(tvb, offset + 1); @@ -1058,8 +1055,7 @@ static void dissect_irlmp(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root) /* Make entries in Protocol column on summary display */ - if (check_col(pinfo->cinfo, COL_PROTOCOL)) - col_set_str(pinfo->cinfo, COL_PROTOCOL, "IrLMP"); + col_set_str(pinfo->cinfo, COL_PROTOCOL, "IrLMP"); dlsap = tvb_get_guint8(tvb, offset); cbit = dlsap & CONTROL_BIT; @@ -1672,8 +1668,7 @@ static void dissect_xid(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root, pro static void dissect_log(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root) { /* Make entries in Protocol column on summary display */ - if (check_col(pinfo->cinfo, COL_PROTOCOL)) - col_set_str(pinfo->cinfo, COL_PROTOCOL, "Log"); + col_set_str(pinfo->cinfo, COL_PROTOCOL, "Log"); /* missed messages? */ if (pinfo->pseudo_header->irda.pkttype == IRDA_MISSED_MSG) @@ -1730,8 +1725,7 @@ static void dissect_irlap(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root) guint8 ca; /* Make entries in Protocol column on summary display */ - if (check_col(pinfo->cinfo, COL_PROTOCOL)) - col_set_str(pinfo->cinfo, COL_PROTOCOL, "IrLAP"); + col_set_str(pinfo->cinfo, COL_PROTOCOL, "IrLAP"); /* Clear Info column */ if (check_col(pinfo->cinfo, COL_INFO)) diff --git a/plugins/profinet/packet-pn-mrp.c b/plugins/profinet/packet-pn-mrp.c index 92a47c6c1d..0486f92492 100644 --- a/plugins/profinet/packet-pn-mrp.c +++ b/plugins/profinet/packet-pn-mrp.c @@ -391,8 +391,7 @@ dissect_PNMRP(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) guint32 offset = 0; - if (check_col(pinfo->cinfo, COL_PROTOCOL)) - col_set_str(pinfo->cinfo, COL_PROTOCOL, "PN-MRP"); + col_set_str(pinfo->cinfo, COL_PROTOCOL, "PN-MRP"); /* Clear the information column on summary display */ if (check_col(pinfo->cinfo, COL_INFO)) { diff --git a/plugins/sercosiii/packet-sercosiii_1v1.c b/plugins/sercosiii/packet-sercosiii_1v1.c index 8c65ecf920..df2a9534f9 100644 --- a/plugins/sercosiii/packet-sercosiii_1v1.c +++ b/plugins/sercosiii/packet-sercosiii_1v1.c @@ -56,8 +56,7 @@ dissect_siii(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) guint tel_no = 0; /* setup columns */ - if(check_col(pinfo->cinfo, COL_PROTOCOL)) - col_set_str(pinfo->cinfo, COL_PROTOCOL, "SERCOS III V1.1"); + col_set_str(pinfo->cinfo, COL_PROTOCOL, "SERCOS III V1.1"); if(check_col(pinfo->cinfo, COL_INFO)) col_clear(pinfo->cinfo, COL_INFO); diff --git a/plugins/sercosiii/packet-sercosiii_1v1_at.c b/plugins/sercosiii/packet-sercosiii_1v1_at.c index eaf28f76bb..81e284d098 100644 --- a/plugins/sercosiii/packet-sercosiii_1v1_at.c +++ b/plugins/sercosiii/packet-sercosiii_1v1_at.c @@ -145,8 +145,7 @@ void dissect_siii_at(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) phase = (tvb_get_guint8(tvb, 1)&0x8F); /* read communication phase out of SERCOS III header*/ telno = (tvb_get_guint8(tvb, 0) & 0xF); /* read number of AT out of SERCOS III header */ - if(check_col(pinfo->cinfo, COL_PROTOCOL)) - col_set_str(pinfo->cinfo, COL_PROTOCOL, "SIII AT"); + col_set_str(pinfo->cinfo, COL_PROTOCOL, "SIII AT"); if(check_col(pinfo->cinfo, COL_INFO)) { diff --git a/plugins/sercosiii/packet-sercosiii_1v1_mdt.c b/plugins/sercosiii/packet-sercosiii_1v1_mdt.c index 4133df7660..0378aa51a4 100644 --- a/plugins/sercosiii/packet-sercosiii_1v1_mdt.c +++ b/plugins/sercosiii/packet-sercosiii_1v1_mdt.c @@ -141,8 +141,7 @@ void dissect_siii_mdt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) guint t_phase; guint telno; - if(check_col(pinfo->cinfo, COL_PROTOCOL)) - col_set_str(pinfo->cinfo, COL_PROTOCOL, "SIII MDT"); + col_set_str(pinfo->cinfo, COL_PROTOCOL, "SIII MDT"); t_phase = (tvb_get_guint8(tvb, 1)&0x8F); /* read communication phase out of SERCOS III header */ telno = (tvb_get_guint8(tvb, 0) & 0xF); /* read number of MDT out of SERCOS III header */ |