diff options
Diffstat (limited to 'asn1')
-rw-r--r-- | asn1/idmp/packet-idmp-template.c | 6 | ||||
-rw-r--r-- | asn1/kerberos/packet-kerberos-template.c | 2 | ||||
-rw-r--r-- | asn1/lcsap/lcsap.cnf | 1 | ||||
-rw-r--r-- | asn1/lcsap/packet-lcsap-template.c | 3 | ||||
-rw-r--r-- | asn1/m3ap/packet-m3ap-template.c | 3 | ||||
-rw-r--r-- | asn1/mpeg-audio/packet-mpeg-audio-template.c | 12 | ||||
-rw-r--r-- | asn1/mpeg-pes/packet-mpeg-pes-template.c | 36 | ||||
-rw-r--r-- | asn1/p1/p1.cnf | 16 | ||||
-rw-r--r-- | asn1/p1/packet-p1-template.c | 3 | ||||
-rw-r--r-- | asn1/p22/p22.cnf | 2 | ||||
-rw-r--r-- | asn1/p7/p7.cnf | 14 | ||||
-rw-r--r-- | asn1/p772/p772.cnf | 4 | ||||
-rw-r--r-- | asn1/ros/packet-ros-template.c | 8 | ||||
-rw-r--r-- | asn1/ros/ros-err.cnf | 2 | ||||
-rw-r--r-- | asn1/ros/ros-inv.cnf | 2 | ||||
-rw-r--r-- | asn1/ros/ros-rej.cnf | 2 | ||||
-rw-r--r-- | asn1/ros/ros-res.cnf | 2 | ||||
-rw-r--r-- | asn1/ros/ros.cnf | 19 | ||||
-rw-r--r-- | asn1/rtse/packet-rtse-template.c | 3 | ||||
-rw-r--r-- | asn1/sbc-ap/packet-sbc-ap-template.c | 9 | ||||
-rw-r--r-- | asn1/sbc-ap/sbc-ap.cnf | 3 | ||||
-rw-r--r-- | asn1/smrse/packet-smrse-template.c | 3 | ||||
-rw-r--r-- | asn1/ulp/ulp.cnf | 6 | ||||
-rw-r--r-- | asn1/x509if/x509if.cnf | 3 |
24 files changed, 58 insertions, 106 deletions
diff --git a/asn1/idmp/packet-idmp-template.c b/asn1/idmp/packet-idmp-template.c index 72c369e48a..88fdbd05c1 100644 --- a/asn1/idmp/packet-idmp-template.c +++ b/asn1/idmp/packet-idmp-template.c @@ -189,8 +189,7 @@ static void dissect_idmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_t pinfo->fragmented = !idmp_final; - if (check_col(pinfo->cinfo, COL_INFO)) - col_append_fstr(pinfo->cinfo, COL_INFO, " [%sIDMP fragment, %u byte%s]", + col_append_fstr(pinfo->cinfo, COL_INFO, " [%sIDMP fragment, %u byte%s]", idmp_final ? "Final " : "" , idmp_length, plurality(idmp_length, "", "s")); @@ -218,8 +217,7 @@ static void dissect_idmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_t } else { if(!idmp_final) { - if (check_col(pinfo->cinfo, COL_INFO)) - col_append_fstr(pinfo->cinfo, COL_INFO, " [IDMP fragment, %u byte%s, IDMP reassembly not enabled]", + col_append_fstr(pinfo->cinfo, COL_INFO, " [IDMP fragment, %u byte%s, IDMP reassembly not enabled]", idmp_length, plurality(idmp_length, "", "s")); proto_tree_add_text(tree, tvb, offset, (idmp_length) ? -1 : 0, diff --git a/asn1/kerberos/packet-kerberos-template.c b/asn1/kerberos/packet-kerberos-template.c index d9c745cd6d..8da6e26a49 100644 --- a/asn1/kerberos/packet-kerberos-template.c +++ b/asn1/kerberos/packet-kerberos-template.c @@ -1660,7 +1660,7 @@ dissect_krb5_PW_SALT(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U proto_tree_add_item(tree, hf_krb_smb_nt_status, tvb, offset, 4, ENC_LITTLE_ENDIAN); nt_status=tvb_get_letohl(tvb, offset); - if(nt_status && check_col(actx->pinfo->cinfo, COL_INFO)) { + if(nt_status) { col_append_fstr(actx->pinfo->cinfo, COL_INFO, " NT Status: %s", val_to_str(nt_status, NT_errors, diff --git a/asn1/lcsap/lcsap.cnf b/asn1/lcsap/lcsap.cnf index f943475f54..005e252d5c 100644 --- a/asn1/lcsap/lcsap.cnf +++ b/asn1/lcsap/lcsap.cnf @@ -98,7 +98,6 @@ ProtocolIE-Field/value ie_field_value #.FN_PARS ProcedureCode VAL_PTR = &ProcedureCode #.FN_FTR ProcedureCode - if (check_col(actx->pinfo->cinfo, COL_INFO)) { guint8 tmp = tvb_get_guint8(tvb, 0); diff --git a/asn1/lcsap/packet-lcsap-template.c b/asn1/lcsap/packet-lcsap-template.c index 3a9279f2a4..2d4ce3e15b 100644 --- a/asn1/lcsap/packet-lcsap-template.c +++ b/asn1/lcsap/packet-lcsap-template.c @@ -229,8 +229,7 @@ dissect_lcsap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree *lcsap_tree = NULL; /* make entry in the Protocol column on summary display */ - if (check_col(pinfo->cinfo, COL_PROTOCOL)) - col_set_str(pinfo->cinfo, COL_PROTOCOL, "LCSAP"); + col_set_str(pinfo->cinfo, COL_PROTOCOL, "LCSAP"); /* create the lcsap protocol tree */ lcsap_item = proto_tree_add_item(tree, proto_lcsap, tvb, 0, -1, ENC_NA); diff --git a/asn1/m3ap/packet-m3ap-template.c b/asn1/m3ap/packet-m3ap-template.c index f4659fd497..4f5b5a1251 100644 --- a/asn1/m3ap/packet-m3ap-template.c +++ b/asn1/m3ap/packet-m3ap-template.c @@ -127,8 +127,7 @@ dissect_m3ap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree *m3ap_tree = NULL; /* make entry in the Protocol column on summary display */ - if (check_col(pinfo->cinfo, COL_PROTOCOL)) - col_set_str(pinfo->cinfo, COL_PROTOCOL, PNAME); + col_set_str(pinfo->cinfo, COL_PROTOCOL, PNAME); /* create the m3ap protocol tree */ if (tree) { diff --git a/asn1/mpeg-audio/packet-mpeg-audio-template.c b/asn1/mpeg-audio/packet-mpeg-audio-template.c index ae2b9b673f..0270550085 100644 --- a/asn1/mpeg-audio/packet-mpeg-audio-template.c +++ b/asn1/mpeg-audio/packet-mpeg-audio-template.c @@ -72,16 +72,12 @@ dissect_mpeg_audio_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) "Audio Layer %d", mpa_layer(&mpa) + 1); if (MPA_BITRATE_VALID(&mpa) && MPA_FREQUENCY_VALID(&mpa)) { data_size = (int)(MPA_DATA_BYTES(&mpa) - sizeof mpa); - if (check_col(pinfo->cinfo, COL_DEF_SRC)) { - SET_ADDRESS(&pinfo->src, AT_NONE, 0, NULL); - col_add_fstr(pinfo->cinfo, COL_DEF_SRC, + SET_ADDRESS(&pinfo->src, AT_NONE, 0, NULL); + col_add_fstr(pinfo->cinfo, COL_DEF_SRC, "%d kb/s", mpa_bitrate(&mpa) / 1000); - } - if (check_col(pinfo->cinfo, COL_DEF_DST)) { - SET_ADDRESS(&pinfo->dst, AT_NONE, 0, NULL); - col_add_fstr(pinfo->cinfo, COL_DEF_DST, + SET_ADDRESS(&pinfo->dst, AT_NONE, 0, NULL); + col_add_fstr(pinfo->cinfo, COL_DEF_DST, "%g kHz", mpa_frequency(&mpa) / (float)1000); - } } if (tree == NULL) diff --git a/asn1/mpeg-pes/packet-mpeg-pes-template.c b/asn1/mpeg-pes/packet-mpeg-pes-template.c index 60bce351b7..44d019e3fb 100644 --- a/asn1/mpeg-pes/packet-mpeg-pes-template.c +++ b/asn1/mpeg-pes/packet-mpeg-pes-template.c @@ -207,12 +207,10 @@ dissect_mpeg_pes_header_data(tvbuff_t *tvb, packet_info *pinfo, offset, 5, &nst); offset += 5; - if (check_col(pinfo->cinfo, COL_DEF_DST)) { - SET_ADDRESS(&pinfo->dst, AT_NONE, 0, NULL); - col_add_fstr(pinfo->cinfo, COL_DEF_DST, + SET_ADDRESS(&pinfo->dst, AT_NONE, 0, NULL); + col_add_fstr(pinfo->cinfo, COL_DEF_DST, "PTS %ld.%09u", (long) nst.secs, nst.nsecs); - } } if (flags & DTS_FLAG) { nstime_t nst; @@ -221,12 +219,10 @@ dissect_mpeg_pes_header_data(tvbuff_t *tvb, packet_info *pinfo, offset, 5, &nst); offset += 5; - if (check_col(pinfo->cinfo, COL_DEF_SRC)) { - SET_ADDRESS(&pinfo->src, AT_NONE, 0, NULL); - col_add_fstr(pinfo->cinfo, COL_DEF_SRC, + SET_ADDRESS(&pinfo->src, AT_NONE, 0, NULL); + col_add_fstr(pinfo->cinfo, COL_DEF_SRC, "DTS %ld.%09u", (long) nst.secs, nst.nsecs); - } } if (flags & ESCR_FLAG) { nstime_t nst; @@ -364,10 +360,8 @@ dissect_mpeg_pes_pack_header(tvbuff_t *tvb, gint offset, program_mux_rate); offset += 3 * 8; - if (check_col(pinfo->cinfo, COL_DEF_SRC)) { - SET_ADDRESS(&pinfo->src, AT_NONE, 0, NULL); - col_add_fstr(pinfo->cinfo, COL_DEF_SRC, "%u B/s", program_mux_rate); - } + SET_ADDRESS(&pinfo->src, AT_NONE, 0, NULL); + col_add_fstr(pinfo->cinfo, COL_DEF_SRC, "%u B/s", program_mux_rate); stuffing_length = tvb_get_guint8(tvb, offset / 8) & 0x07; proto_tree_add_item(tree, hf_mpeg_pes_stuffing_length, tvb, @@ -393,6 +387,7 @@ dissect_mpeg_pes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data int stream; asn1_ctx_t asn1_ctx; gint offset = 0; + const char *s; if (!tvb_bytes_exist(tvb, 0, 3)) return FALSE; /* not enough bytes for a PES prefix */ @@ -404,11 +399,9 @@ dissect_mpeg_pes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data col_clear(pinfo->cinfo, COL_INFO); stream = tvb_get_guint8(tvb, 3); - if (check_col(pinfo->cinfo, COL_INFO)) { - const char *s = try_val_to_str(stream, mpeg_pes_T_stream_vals); - if (s != NULL) - col_set_str(pinfo->cinfo, COL_INFO, s); - } + s = try_val_to_str(stream, mpeg_pes_T_stream_vals); + if (s != NULL) + col_set_str(pinfo->cinfo, COL_INFO, s); #if 0 if (tree == NULL) @@ -422,12 +415,9 @@ dissect_mpeg_pes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data int frame_type; frame_type = tvb_get_guint8(tvb, 5) >> 3 & 0x07; - if (check_col(pinfo->cinfo, COL_INFO)) { - const char *s = try_val_to_str(frame_type, - mpeg_pes_T_frame_type_vals); - if (s != NULL) - col_set_str(pinfo->cinfo, COL_INFO, s); - } + s = try_val_to_str(frame_type, mpeg_pes_T_frame_type_vals); + if (s != NULL) + col_set_str(pinfo->cinfo, COL_INFO, s); offset = dissect_mpeg_pes_Picture(tvb, offset, &asn1_ctx, tree, hf_mpeg_video_picture); diff --git a/asn1/p1/p1.cnf b/asn1/p1/p1.cnf index 1c9a6160f7..1c6b44a91e 100644 --- a/asn1/p1/p1.cnf +++ b/asn1/p1/p1.cnf @@ -689,7 +689,7 @@ MessageToken B "2.6.1.7.36" "id-hat-forwarded-token" } else { - if (check_col(actx->pinfo->cinfo, COL_INFO) && mtaname) { + if (mtaname) { col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", tvb_format_text(mtaname, 0, tvb_length(mtaname))); } @@ -1093,7 +1093,7 @@ MessageToken B "2.6.1.7.36" "id-hat-forwarded-token" if(*oraddress) { proto_item_append_text(address_item, " (%%s/", oraddress); - if(doing_subjectid && check_col(actx->pinfo->cinfo, COL_INFO)) { + if(doing_subjectid) { col_append_fstr(actx->pinfo->cinfo, COL_INFO, " (%%s/", oraddress); } } @@ -1111,7 +1111,7 @@ MessageToken B "2.6.1.7.36" "id-hat-forwarded-token" if(doing_address) proto_item_append_text(address_item, " $ %%s)", tvb_format_text(id, 0, tvb_length(id))); - if(doing_subjectid && check_col(actx->pinfo->cinfo, COL_INFO)) + if(doing_subjectid) col_append_fstr(actx->pinfo->cinfo, COL_INFO, " $ %%s)", tvb_format_text(id, 0, tvb_length(id))); } @@ -1206,7 +1206,7 @@ MessageToken B "2.6.1.7.36" "id-hat-forwarded-token" #.FN_BODY MTABindError int error = -1; %(DEFAULT_BODY)s - if((error != -1) && check_col(actx->pinfo->cinfo, COL_INFO)) + if((error != -1)) col_append_fstr(actx->pinfo->cinfo, COL_INFO, " (%%s)", val_to_str(error, p1_MTABindError_vals, "error(%%d)")); #.FN_PARS TokenTypeIdentifier @@ -1226,9 +1226,7 @@ MessageToken B "2.6.1.7.36" "id-hat-forwarded-token" %(DEFAULT_BODY)s if( (credentials!=-1) && p1_Credentials_vals[credentials].strptr ){ - if (check_col(actx->pinfo->cinfo, COL_INFO)) { - col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", p1_Credentials_vals[credentials].strptr); - } + col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", p1_Credentials_vals[credentials].strptr); } #.FN_PARS TokenDataType @@ -1274,7 +1272,7 @@ MessageToken B "2.6.1.7.36" "id-hat-forwarded-token" %(DEFAULT_BODY)s if( (apdu!=-1) && p1_MTS_APDU_vals[apdu].strptr ){ - if(check_col(actx->pinfo->cinfo, COL_INFO) && (apdu != 0)) { /* we don't show "message" - sub-dissectors have better idea */ + if(apdu != 0) { /* we don't show "message" - sub-dissectors have better idea */ col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", p1_MTS_APDU_vals[apdu].strptr); } } @@ -1288,9 +1286,7 @@ MessageToken B "2.6.1.7.36" "id-hat-forwarded-token" %(DEFAULT_BODY)s if( (report!=-1) && p1_ReportType_vals[report].strptr ){ - if(check_col(actx->pinfo->cinfo, COL_INFO)) { col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", p1_ReportType_vals[report].strptr); - } } #.FN_BODY MessageSubmissionArgument diff --git a/asn1/p1/packet-p1-template.c b/asn1/p1/packet-p1-template.c index bee6d586ca..cb6cb2a8c8 100644 --- a/asn1/p1/packet-p1-template.c +++ b/asn1/p1/packet-p1-template.c @@ -218,8 +218,7 @@ dissect_p1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) return; } - if (check_col(pinfo->cinfo, COL_INFO)) - col_set_str(pinfo->cinfo, COL_INFO, p1_op_name); + col_set_str(pinfo->cinfo, COL_INFO, p1_op_name); while (tvb_reported_length_remaining(tvb, offset) > 0){ old_offset=offset; diff --git a/asn1/p22/p22.cnf b/asn1/p22/p22.cnf index ae0c3b6586..478ad178c3 100644 --- a/asn1/p22/p22.cnf +++ b/asn1/p22/p22.cnf @@ -250,7 +250,7 @@ IpnSecurityResponse B "2.6.1.18.1" "id-sec-security-common-fields" %(DEFAULT_BODY)s - if(subject && check_col(actx->pinfo->cinfo, COL_INFO)) + if(subject) col_append_fstr(actx->pinfo->cinfo, COL_INFO, " (%%s)", tvb_format_text(subject, 0, tvb_length(subject))); #.FN_PARS CharacterSetRegistration diff --git a/asn1/p7/p7.cnf b/asn1/p7/p7.cnf index fe2fba6624..0fbece2c44 100644 --- a/asn1/p7/p7.cnf +++ b/asn1/p7/p7.cnf @@ -370,7 +370,7 @@ RTSE-apdus B "2.6.0.2.10""id-as-ms-rtse" %(DEFAULT_BODY)s - if (check_col(actx->pinfo->cinfo, COL_INFO) && (ora = p1_get_last_oraddress())) { + if (ora = p1_get_last_oraddress()) { col_append_fstr(actx->pinfo->cinfo, COL_INFO, " (initiator=%%s)", ora); } @@ -382,14 +382,10 @@ RTSE-apdus B "2.6.0.2.10""id-as-ms-rtse" col_append_str(actx->pinfo->cinfo, COL_INFO, ")"); #.FN_FTR NumberRange/from - if (check_col(actx->pinfo->cinfo, COL_INFO)) { - col_append_fstr(actx->pinfo->cinfo, COL_INFO, " from %d", seqno); - } + col_append_fstr(actx->pinfo->cinfo, COL_INFO, " from %d", seqno); #.FN_FTR NumberRange/to - if (check_col(actx->pinfo->cinfo, COL_INFO)) { - col_append_fstr(actx->pinfo->cinfo, COL_INFO, " to %d", seqno); - } + col_append_fstr(actx->pinfo->cinfo, COL_INFO, " to %d", seqno); #.FN_PARS SummarizeResult/count VAL_PTR = &count @@ -398,9 +394,7 @@ RTSE-apdus B "2.6.0.2.10""id-as-ms-rtse" %(DEFAULT_BODY)s - if (check_col(actx->pinfo->cinfo, COL_INFO)) { - col_append_fstr(actx->pinfo->cinfo, COL_INFO, " (count=%%d)", count); - } + col_append_fstr(actx->pinfo->cinfo, COL_INFO, " (count=%%d)", count); #.FN_BODY MSMessageSubmissionArgument p1_initialize_content_globals (tree, TRUE); diff --git a/asn1/p772/p772.cnf b/asn1/p772/p772.cnf index 6896efd672..2b353657fb 100644 --- a/asn1/p772/p772.cnf +++ b/asn1/p772/p772.cnf @@ -104,7 +104,7 @@ InformationObject B "2.6.1.4.17.1.3.26.0.4406.0.4.1" "id-et-content-p772" #.FN_BODY PrimaryPrecedence int precedence = -1; %(DEFAULT_BODY)s - if((precedence != -1) && check_col(actx->pinfo->cinfo, COL_INFO)) + if(precedence != -1) col_append_fstr(actx->pinfo->cinfo, COL_INFO, " (primary=%%s)", val_to_str(precedence, p772_PrimaryPrecedence_vals, "precedence(%%d)")); #.FN_PARS CopyPrecedence @@ -112,5 +112,5 @@ InformationObject B "2.6.1.4.17.1.3.26.0.4406.0.4.1" "id-et-content-p772" #.FN_BODY CopyPrecedence int precedence = -1; %(DEFAULT_BODY)s - if((precedence != -1) && check_col(actx->pinfo->cinfo, COL_INFO)) + if(precedence != -1) col_append_fstr(actx->pinfo->cinfo, COL_INFO, " (copy=%%s)", val_to_str(precedence, p772_CopyPrecedence_vals, "precedence(%%d)")); diff --git a/asn1/ros/packet-ros-template.c b/asn1/ros/packet-ros-template.c index b8e4741022..c1277bae8c 100644 --- a/asn1/ros/packet-ros-template.c +++ b/asn1/ros/packet-ros-template.c @@ -193,11 +193,9 @@ static gboolean ros_try_string(const char *oid, tvbuff_t *tvb, packet_info *pinf opname = val_to_str(opcode_lcl, lookup, "Unknown opcode (%d)"); - if (check_col(pinfo->cinfo, COL_INFO)) { - col_set_str(pinfo->cinfo, COL_INFO, opname); - if(suffix) - col_append_str(pinfo->cinfo, COL_INFO, suffix); - } + col_set_str(pinfo->cinfo, COL_INFO, opname); + if(suffix) + col_append_str(pinfo->cinfo, COL_INFO, suffix); (*opdissector)(tvb, pinfo, ros_tree, NULL); diff --git a/asn1/ros/ros-err.cnf b/asn1/ros/ros-err.cnf index 4b5ec2a86a..5ec7e0e319 100644 --- a/asn1/ros/ros-err.cnf +++ b/asn1/ros/ros-err.cnf @@ -31,7 +31,7 @@ if (actx->rose_ctx->apdu_depth >= 0) proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", descr); - if (actx->rose_ctx->fillin_info && check_col(actx->pinfo->cinfo, COL_INFO)) + if (actx->rose_ctx->fillin_info) col_append_str(actx->pinfo->cinfo, COL_INFO, descr); if (actx->rose_ctx->fillin_ptr) g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size); diff --git a/asn1/ros/ros-inv.cnf b/asn1/ros/ros-inv.cnf index e2a61994cb..0e7ba0390b 100644 --- a/asn1/ros/ros-inv.cnf +++ b/asn1/ros/ros-inv.cnf @@ -32,7 +32,7 @@ if (actx->rose_ctx->apdu_depth >= 0) proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", descr); - if (actx->rose_ctx->fillin_info && check_col(actx->pinfo->cinfo, COL_INFO)) + if (actx->rose_ctx->fillin_info) col_append_str(actx->pinfo->cinfo, COL_INFO, descr); if (actx->rose_ctx->fillin_ptr) g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size); diff --git a/asn1/ros/ros-rej.cnf b/asn1/ros/ros-rej.cnf index a651953dec..02b97f582f 100644 --- a/asn1/ros/ros-rej.cnf +++ b/asn1/ros/ros-rej.cnf @@ -12,7 +12,7 @@ if (actx->rose_ctx->apdu_depth >= 0) proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", descr); - if (actx->rose_ctx->fillin_info && check_col(actx->pinfo->cinfo, COL_INFO)) + if (actx->rose_ctx->fillin_info) col_append_str(actx->pinfo->cinfo, COL_INFO, descr); if (actx->rose_ctx->fillin_ptr) g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size); diff --git a/asn1/ros/ros-res.cnf b/asn1/ros/ros-res.cnf index f02a779cc5..d9ab23c421 100644 --- a/asn1/ros/ros-res.cnf +++ b/asn1/ros/ros-res.cnf @@ -32,7 +32,7 @@ if (actx->rose_ctx->apdu_depth >= 0) proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", descr); - if (actx->rose_ctx->fillin_info && check_col(actx->pinfo->cinfo, COL_INFO)) + if (actx->rose_ctx->fillin_info) col_append_str(actx->pinfo->cinfo, COL_INFO, descr); if (actx->rose_ctx->fillin_ptr) g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size); diff --git a/asn1/ros/ros.cnf b/asn1/ros/ros.cnf index 589737d1df..3ad482bbcc 100644 --- a/asn1/ros/ros.cnf +++ b/asn1/ros/ros.cnf @@ -158,8 +158,7 @@ Reject/problem/returnResult rejectResult } #.FN_BODY ROS/reject - if(check_col(actx->pinfo->cinfo, COL_INFO)) - col_set_str(actx->pinfo->cinfo, COL_INFO, "Reject"); + col_set_str(actx->pinfo->cinfo, COL_INFO, "Reject"); %(DEFAULT_BODY)s #.FN_PARS GeneralProblem @@ -170,9 +169,7 @@ Reject/problem/returnResult rejectResult %(DEFAULT_BODY)s - if (check_col(actx->pinfo->cinfo, COL_INFO)) { - col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, ros_GeneralProblem_vals, "GeneralProblem(%%d)")); - } + col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, ros_GeneralProblem_vals, "GeneralProblem(%%d)")); #.FN_PARS InvokeProblem VAL_PTR = &problem @@ -182,9 +179,7 @@ Reject/problem/returnResult rejectResult %(DEFAULT_BODY)s - if (check_col(actx->pinfo->cinfo, COL_INFO)) { - col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, ros_InvokeProblem_vals, "InvokeProblem(%%d)")); - } + col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, ros_InvokeProblem_vals, "InvokeProblem(%%d)")); #.FN_PARS ReturnResultProblem VAL_PTR = &problem @@ -194,9 +189,7 @@ Reject/problem/returnResult rejectResult %(DEFAULT_BODY)s - if (check_col(actx->pinfo->cinfo, COL_INFO)) { - col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, ros_ReturnResultProblem_vals, "ReturnResultProblem(%%d)")); - } + col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, ros_ReturnResultProblem_vals, "ReturnResultProblem(%%d)")); #.FN_PARS ReturnErrorProblem VAL_PTR = &problem @@ -206,8 +199,6 @@ Reject/problem/returnResult rejectResult %(DEFAULT_BODY)s - if (check_col(actx->pinfo->cinfo, COL_INFO)) { - col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, ros_ReturnErrorProblem_vals, "ReturnErrorProblem(%%d)")); - } + col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, ros_ReturnErrorProblem_vals, "ReturnErrorProblem(%%d)")); #.END diff --git a/asn1/rtse/packet-rtse-template.c b/asn1/rtse/packet-rtse-template.c index 9e5d39834b..bcaf10fcd4 100644 --- a/asn1/rtse/packet-rtse-template.c +++ b/asn1/rtse/packet-rtse-template.c @@ -268,8 +268,7 @@ dissect_rtse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) fragment_length = tvb_length_remaining (tvb, offset); } - if (check_col(pinfo->cinfo, COL_INFO)) - col_append_fstr(pinfo->cinfo, COL_INFO, "[RTSE fragment, %u byte%s]", + col_append_fstr(pinfo->cinfo, COL_INFO, "[RTSE fragment, %u byte%s]", fragment_length, plurality(fragment_length, "", "s")); } else if (rtse_reassemble && session->spdu_type == SES_MAJOR_SYNC_POINT) { if (next_tvb) { diff --git a/asn1/sbc-ap/packet-sbc-ap-template.c b/asn1/sbc-ap/packet-sbc-ap-template.c index b79cd824c4..03c3a9cbdc 100644 --- a/asn1/sbc-ap/packet-sbc-ap-template.c +++ b/asn1/sbc-ap/packet-sbc-ap-template.c @@ -130,12 +130,11 @@ static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, p static void dissect_sbc_ap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - proto_item *sbc_ap_item = NULL; - proto_tree *sbc_ap_tree = NULL; + proto_item *sbc_ap_item = NULL; + proto_tree *sbc_ap_tree = NULL; - /* make entry in the Protocol column on summary display */ - if (check_col(pinfo->cinfo, COL_PROTOCOL)) - col_set_str(pinfo->cinfo, COL_PROTOCOL, PNAME); + /* make entry in the Protocol column on summary display */ + col_set_str(pinfo->cinfo, COL_PROTOCOL, PNAME); /* create the sbc_ap protocol tree */ if (tree) { diff --git a/asn1/sbc-ap/sbc-ap.cnf b/asn1/sbc-ap/sbc-ap.cnf index ac364c17e5..f10e8edecf 100644 --- a/asn1/sbc-ap/sbc-ap.cnf +++ b/asn1/sbc-ap/sbc-ap.cnf @@ -61,8 +61,7 @@ ProtocolIE-Field/value ie_field_value #.FN_PARS ProcedureCode VAL_PTR = &ProcedureCode #.FN_FTR ProcedureCode - if (check_col(actx->pinfo->cinfo, COL_INFO)) - col_add_fstr(actx->pinfo->cinfo, COL_INFO, "%s ", + col_add_fstr(actx->pinfo->cinfo, COL_INFO, "%s ", val_to_str(ProcedureCode, sbc_ap_ProcedureCode_vals, "unknown message")); #.END diff --git a/asn1/smrse/packet-smrse-template.c b/asn1/smrse/packet-smrse-template.c index 51d15312c1..bf7a67ac5f 100644 --- a/asn1/smrse/packet-smrse-template.c +++ b/asn1/smrse/packet-smrse-template.c @@ -95,8 +95,7 @@ dissect_smrse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void * } col_set_str(pinfo->cinfo, COL_PROTOCOL, "SMRSE"); - if (check_col(pinfo->cinfo, COL_INFO)) - col_add_str(pinfo->cinfo, COL_INFO, val_to_str(tag, tag_vals,"Unknown Tag:0x%02x")); + col_add_str(pinfo->cinfo, COL_INFO, val_to_str(tag, tag_vals,"Unknown Tag:0x%02x")); proto_tree_add_item(tree, hf_smrse_reserved, tvb, 0, 1, ENC_BIG_ENDIAN); proto_tree_add_item(tree, hf_smrse_length, tvb, 1, 2, ENC_BIG_ENDIAN); diff --git a/asn1/ulp/ulp.cnf b/asn1/ulp/ulp.cnf index f5cebf011e..b982b242db 100644 --- a/asn1/ulp/ulp.cnf +++ b/asn1/ulp/ulp.cnf @@ -38,10 +38,8 @@ guint32 UlpMessage; %(DEFAULT_BODY)s - if (check_col(%(ACTX)s->pinfo->cinfo, COL_INFO)) - { - col_append_fstr(%(ACTX)s->pinfo->cinfo, COL_INFO, "%%s ", val_to_str(UlpMessage,ulp_UlpMessage_vals,"Unknown")); - } + col_append_fstr(%(ACTX)s->pinfo->cinfo, COL_INFO, "%%s ", val_to_str(UlpMessage,ulp_UlpMessage_vals,"Unknown")); + #.END #.FN_BODY PosPayLoad/rrlpPayload VAL_PTR = &rrlp_tvb diff --git a/asn1/x509if/x509if.cnf b/asn1/x509if/x509if.cnf index 68a0cb7cb9..b9c7b9e5d9 100644 --- a/asn1/x509if/x509if.cnf +++ b/asn1/x509if/x509if.cnf @@ -386,8 +386,7 @@ DistinguishedName B "2.16.840.1.101.2.2.1.188" "id-at-primaryMember" proto_item_append_text(top_of_dn, " (%%s)", last_dn); /* see if we should append this to the col info */ - if(check_col(actx->pinfo->cinfo, COL_INFO) && - (fmt = val_to_str(hf_index, fmt_vals, "")) && *fmt) { + if((fmt = val_to_str(hf_index, fmt_vals, "")) && *fmt) { /* we have a format */ col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s%%s", fmt, last_dn); } |