diff options
41 files changed, 168 insertions, 262 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); } diff --git a/epan/dissectors/packet-h450-ros.c b/epan/dissectors/packet-h450-ros.c index ec41edfa7b..a4a57fd107 100644 --- a/epan/dissectors/packet-h450-ros.c +++ b/epan/dissectors/packet-h450-ros.c @@ -235,7 +235,7 @@ dissect_h450_ros_Invoke(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, 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); @@ -318,7 +318,7 @@ dissect_h450_ros_ReturnResult(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *act 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); @@ -388,7 +388,7 @@ dissect_h450_ros_ReturnError(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx 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); @@ -540,7 +540,7 @@ dissect_h450_ros_Reject(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, 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/epan/dissectors/packet-idmp.c b/epan/dissectors/packet-idmp.c index c995af2427..8510b144e1 100644 --- a/epan/dissectors/packet-idmp.c +++ b/epan/dissectors/packet-idmp.c @@ -671,8 +671,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")); @@ -700,8 +699,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, @@ -933,7 +931,7 @@ void proto_register_idmp(void) NULL, HFILL }}, /*--- End of included file: packet-idmp-hfarr.c ---*/ -#line 322 "../../asn1/idmp/packet-idmp-template.c" +#line 320 "../../asn1/idmp/packet-idmp-template.c" }; /* List of subtrees */ @@ -956,7 +954,7 @@ void proto_register_idmp(void) &ett_idmp_InvokeId, /*--- End of included file: packet-idmp-ettarr.c ---*/ -#line 330 "../../asn1/idmp/packet-idmp-template.c" +#line 328 "../../asn1/idmp/packet-idmp-template.c" }; module_t *idmp_module; diff --git a/epan/dissectors/packet-lcsap.c b/epan/dissectors/packet-lcsap.c index 52d8ea2fdc..5d984b5a9a 100644 --- a/epan/dissectors/packet-lcsap.c +++ b/epan/dissectors/packet-lcsap.c @@ -446,7 +446,6 @@ dissect_lcsap_ProcedureCode(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx #line 100 "../../asn1/lcsap/lcsap.cnf" - if (check_col(actx->pinfo->cinfo, COL_INFO)) { guint8 tmp = tvb_get_guint8(tvb, 0); @@ -747,7 +746,7 @@ dissect_lcsap_Correlation_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx static int dissect_lcsap_DegreesLatitude(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 213 "../../asn1/lcsap/lcsap.cnf" +#line 212 "../../asn1/lcsap/lcsap.cnf" guint32 degrees; offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, @@ -764,7 +763,7 @@ dissect_lcsap_DegreesLatitude(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *act static int dissect_lcsap_DegreesLongitude(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 221 "../../asn1/lcsap/lcsap.cnf" +#line 220 "../../asn1/lcsap/lcsap.cnf" guint32 degrees; offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, @@ -782,7 +781,7 @@ dissect_lcsap_DegreesLongitude(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *ac static int dissect_lcsap_PLMN_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 167 "../../asn1/lcsap/lcsap.cnf" +#line 166 "../../asn1/lcsap/lcsap.cnf" tvbuff_t *parameter_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 3, 3, FALSE, ¶meter_tvb); @@ -850,7 +849,7 @@ dissect_lcsap_Geographical_Coordinates(tvbuff_t *tvb _U_, int offset _U_, asn1_c static int dissect_lcsap_Uncertainty_Code(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 205 "../../asn1/lcsap/lcsap.cnf" +#line 204 "../../asn1/lcsap/lcsap.cnf" guint32 uncertainty_code; offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, @@ -1144,7 +1143,7 @@ dissect_lcsap_Global_eNB_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx static int dissect_lcsap_GNSS_Positioning_Method_And_Usage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 191 "../../asn1/lcsap/lcsap.cnf" +#line 190 "../../asn1/lcsap/lcsap.cnf" tvbuff_t *parameter_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -1633,7 +1632,7 @@ dissect_lcsap_Payload_Type(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _ static int dissect_lcsap_Positioning_Method_And_Usage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 179 "../../asn1/lcsap/lcsap.cnf" +#line 178 "../../asn1/lcsap/lcsap.cnf" tvbuff_t *parameter_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -2256,8 +2255,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); @@ -2320,7 +2318,7 @@ proto_reg_handoff_lcsap(void) /*--- End of included file: packet-lcsap-dis-tab.c ---*/ -#line 258 "../../asn1/lcsap/packet-lcsap-template.c" +#line 257 "../../asn1/lcsap/packet-lcsap-template.c" } else { if (SctpPort != 0) { dissector_delete_uint("sctp.port", SctpPort, lcsap_handle); @@ -2802,7 +2800,7 @@ void proto_register_lcsap(void) { "UnsuccessfulOutcome_value", HFILL }}, /*--- End of included file: packet-lcsap-hfarr.c ---*/ -#line 303 "../../asn1/lcsap/packet-lcsap-template.c" +#line 302 "../../asn1/lcsap/packet-lcsap-template.c" }; /* List of subtrees */ @@ -2858,7 +2856,7 @@ void proto_register_lcsap(void) { &ett_lcsap_UnsuccessfulOutcome, /*--- End of included file: packet-lcsap-ettarr.c ---*/ -#line 309 "../../asn1/lcsap/packet-lcsap-template.c" +#line 308 "../../asn1/lcsap/packet-lcsap-template.c" }; module_t *lcsap_module; diff --git a/epan/dissectors/packet-m3ap.c b/epan/dissectors/packet-m3ap.c index 3d4d54cb60..751c136ebc 100644 --- a/epan/dissectors/packet-m3ap.c +++ b/epan/dissectors/packet-m3ap.c @@ -2062,8 +2062,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) { @@ -2478,7 +2477,7 @@ void proto_register_m3ap(void) { "UnsuccessfulOutcome_value", HFILL }}, /*--- End of included file: packet-m3ap-hfarr.c ---*/ -#line 158 "../../asn1/m3ap/packet-m3ap-template.c" +#line 157 "../../asn1/m3ap/packet-m3ap-template.c" }; /* List of subtrees */ @@ -2534,7 +2533,7 @@ void proto_register_m3ap(void) { &ett_m3ap_UnsuccessfulOutcome, /*--- End of included file: packet-m3ap-ettarr.c ---*/ -#line 164 "../../asn1/m3ap/packet-m3ap-template.c" +#line 163 "../../asn1/m3ap/packet-m3ap-template.c" }; @@ -2609,7 +2608,7 @@ proto_reg_handoff_m3ap(void) /*--- End of included file: packet-m3ap-dis-tab.c ---*/ -#line 194 "../../asn1/m3ap/packet-m3ap-template.c" +#line 193 "../../asn1/m3ap/packet-m3ap-template.c" dissector_add_uint("m3ap.extension", 17, new_create_dissector_handle(dissect_AllocationAndRetentionPriority_PDU, proto_m3ap)); } else { diff --git a/epan/dissectors/packet-mpeg-audio.c b/epan/dissectors/packet-mpeg-audio.c index a1d3f029b6..29d2ee3418 100644 --- a/epan/dissectors/packet-mpeg-audio.c +++ b/epan/dissectors/packet-mpeg-audio.c @@ -484,16 +484,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) @@ -657,7 +653,7 @@ proto_register_mpeg_audio(void) NULL, HFILL }}, /*--- End of included file: packet-mpeg-audio-hfarr.c ---*/ -#line 156 "../../asn1/mpeg-audio/packet-mpeg-audio-template.c" +#line 152 "../../asn1/mpeg-audio/packet-mpeg-audio-template.c" { &hf_mpeg_audio_data, { "Data", "mpeg-audio.data", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, @@ -681,7 +677,7 @@ proto_register_mpeg_audio(void) &ett_mpeg_audio_ID3v1, /*--- End of included file: packet-mpeg-audio-ettarr.c ---*/ -#line 173 "../../asn1/mpeg-audio/packet-mpeg-audio-template.c" +#line 169 "../../asn1/mpeg-audio/packet-mpeg-audio-template.c" }; proto_mpeg_audio = proto_register_protocol( diff --git a/epan/dissectors/packet-mpeg-pes.c b/epan/dissectors/packet-mpeg-pes.c index 4847b7146e..445eb66ef8 100644 --- a/epan/dissectors/packet-mpeg-pes.c +++ b/epan/dissectors/packet-mpeg-pes.c @@ -648,12 +648,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; @@ -662,12 +660,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; @@ -805,10 +801,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, @@ -834,6 +828,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 */ @@ -845,11 +840,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) @@ -863,12 +856,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); @@ -1210,7 +1200,7 @@ proto_register_mpeg_pes(void) "BIT_STRING_SIZE_16", HFILL }}, /*--- End of included file: packet-mpeg-pes-hfarr.c ---*/ -#line 568 "../../asn1/mpeg-pes/packet-mpeg-pes-template.c" +#line 558 "../../asn1/mpeg-pes/packet-mpeg-pes-template.c" { &hf_mpeg_pes_pack_header, { "Pack header", "mpeg-pes.pack", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, @@ -1328,7 +1318,7 @@ proto_register_mpeg_pes(void) &ett_mpeg_pes_Picture, /*--- End of included file: packet-mpeg-pes-ettarr.c ---*/ -#line 675 "../../asn1/mpeg-pes/packet-mpeg-pes-template.c" +#line 665 "../../asn1/mpeg-pes/packet-mpeg-pes-template.c" &ett_mpeg_pes_pack_header, &ett_mpeg_pes_header_data, &ett_mpeg_pes_trick_mode diff --git a/epan/dissectors/packet-p1.c b/epan/dissectors/packet-p1.c index bf55130bb8..c1cefd992c 100644 --- a/epan/dissectors/packet-p1.c +++ b/epan/dissectors/packet-p1.c @@ -940,7 +940,7 @@ dissect_p1_MTAName(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, } 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))); } @@ -1127,9 +1127,7 @@ dissect_p1_Credentials(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset 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); } @@ -1384,7 +1382,7 @@ dissect_p1_MTABindError(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset offset = dissect_ber_constrained_integer(implicit_tag, actx, tree, tvb, offset, 0U, ub_integer_options, hf_index, &error); - 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)")); @@ -1654,7 +1652,7 @@ dissect_p1_GlobalDomainIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, 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); } } @@ -1681,7 +1679,7 @@ dissect_p1_LocalIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off 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))); } @@ -2722,7 +2720,7 @@ dissect_p1_T_bilateral_domain(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int static int dissect_p1_T_bilateral_information(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1254 "../../asn1/p1/p1.cnf" +#line 1252 "../../asn1/p1/p1.cnf" proto_item *item = NULL; int loffset = 0; guint32 len = 0; @@ -3628,7 +3626,7 @@ static const ber_choice_t ReportType_choice[] = { static int dissect_p1_ReportType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1286 "../../asn1/p1/p1.cnf" +#line 1284 "../../asn1/p1/p1.cnf" gint report = -1; offset = dissect_ber_choice(actx, tree, tvb, offset, @@ -3637,9 +3635,7 @@ dissect_p1_ReportType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _ 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); - } } @@ -3770,7 +3766,7 @@ static const ber_choice_t MTS_APDU_choice[] = { static int dissect_p1_MTS_APDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1272 "../../asn1/p1/p1.cnf" +#line 1270 "../../asn1/p1/p1.cnf" gint apdu = -1; offset = dissect_ber_choice(actx, tree, tvb, offset, @@ -3779,7 +3775,7 @@ dissect_p1_MTS_APDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_ 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); } } @@ -4116,7 +4112,7 @@ static const ber_sequence_t MessageSubmissionArgument_sequence[] = { static int dissect_p1_MessageSubmissionArgument(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1297 "../../asn1/p1/p1.cnf" +#line 1293 "../../asn1/p1/p1.cnf" p1_initialize_content_globals(tree, TRUE); offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, MessageSubmissionArgument_sequence, hf_index, ett_p1_MessageSubmissionArgument); @@ -4690,7 +4686,7 @@ static const ber_sequence_t MessageDeliveryArgument_sequence[] = { static int dissect_p1_MessageDeliveryArgument(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1302 "../../asn1/p1/p1.cnf" +#line 1298 "../../asn1/p1/p1.cnf" p1_initialize_content_globals(tree, TRUE); offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, MessageDeliveryArgument_sequence, hf_index, ett_p1_MessageDeliveryArgument); @@ -4800,7 +4796,7 @@ static const ber_sequence_t ReportDeliveryArgument_set[] = { static int dissect_p1_ReportDeliveryArgument(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1307 "../../asn1/p1/p1.cnf" +#line 1303 "../../asn1/p1/p1.cnf" p1_initialize_content_globals(tree, TRUE); offset = dissect_ber_set(implicit_tag, actx, tree, tvb, offset, ReportDeliveryArgument_set, hf_index, ett_p1_ReportDeliveryArgument); @@ -7216,7 +7212,7 @@ dissect_p1_TokenDataType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offse static int dissect_p1_T_value(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1238 "../../asn1/p1/p1.cnf" +#line 1236 "../../asn1/p1/p1.cnf" proto_item_append_text(tree, " (%s)", val_to_str(extension_id, p1_TokenDataType_vals, "tokendata-type %d")); if (dissector_try_uint(p1_tokendata_dissector_table, extension_id, tvb, actx->pinfo, tree)) { @@ -8402,8 +8398,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; @@ -10702,7 +10697,7 @@ void proto_register_p1(void) { NULL, HFILL }}, /*--- End of included file: packet-p1-hfarr.c ---*/ -#line 261 "../../asn1/p1/packet-p1-template.c" +#line 260 "../../asn1/p1/packet-p1-template.c" }; /* List of subtrees */ @@ -10901,7 +10896,7 @@ void proto_register_p1(void) { &ett_p1_SEQUENCE_SIZE_1_ub_recipients_OF_PerRecipientProbeSubmissionFields, /*--- End of included file: packet-p1-ettarr.c ---*/ -#line 274 "../../asn1/p1/packet-p1-template.c" +#line 273 "../../asn1/p1/packet-p1-template.c" }; static ei_register_info ei[] = { @@ -11104,7 +11099,7 @@ void proto_reg_handoff_p1(void) { /*--- End of included file: packet-p1-dis-tab.c ---*/ -#line 320 "../../asn1/p1/packet-p1-template.c" +#line 319 "../../asn1/p1/packet-p1-template.c" /* APPLICATION CONTEXT */ diff --git a/epan/dissectors/packet-p22.c b/epan/dissectors/packet-p22.c index dcb76d3d28..5d95bca7e0 100644 --- a/epan/dissectors/packet-p22.c +++ b/epan/dissectors/packet-p22.c @@ -1237,7 +1237,7 @@ dissect_p22_SubjectField(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offse 0, ub_subject_field, hf_index, &subject); - 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))); diff --git a/epan/dissectors/packet-p7.c b/epan/dissectors/packet-p7.c index ac71df685b..f95460c25d 100644 --- a/epan/dissectors/packet-p7.c +++ b/epan/dissectors/packet-p7.c @@ -947,7 +947,7 @@ dissect_p7_T_initiator_name(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of offset = dissect_p1_ORAddressAndOrDirectoryName(implicit_tag, tvb, offset, actx, tree, hf_index); - 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); } @@ -1321,9 +1321,7 @@ static int dissect_p7_T_from_number(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_p7_SequenceNumber(implicit_tag, tvb, offset, actx, tree, hf_index); - 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); return offset; } @@ -1334,9 +1332,7 @@ static int dissect_p7_T_to_number(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_p7_SequenceNumber(implicit_tag, tvb, offset, actx, tree, hf_index); - 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); return offset; } @@ -1865,9 +1861,7 @@ dissect_p7_T_count(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, 0U, ub_messages, hf_index, &count); - 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); return offset; diff --git a/epan/dissectors/packet-p772.c b/epan/dissectors/packet-p772.c index 6c308ccf1c..e2dae421b8 100644 --- a/epan/dissectors/packet-p772.c +++ b/epan/dissectors/packet-p772.c @@ -652,7 +652,7 @@ dissect_p772_PrimaryPrecedence(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, &precedence); - 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)")); @@ -682,7 +682,7 @@ dissect_p772_CopyPrecedence(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, &precedence); - 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/epan/dissectors/packet-q932-ros.c b/epan/dissectors/packet-q932-ros.c index cfd1c6d6b1..22c7cfe217 100644 --- a/epan/dissectors/packet-q932-ros.c +++ b/epan/dissectors/packet-q932-ros.c @@ -300,7 +300,7 @@ dissect_q932_ros_Invoke(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset 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); @@ -393,7 +393,7 @@ dissect_q932_ros_ReturnResult(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int 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); @@ -473,7 +473,7 @@ dissect_q932_ros_ReturnError(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o 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); @@ -625,7 +625,7 @@ dissect_q932_ros_Reject(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset 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/epan/dissectors/packet-ros.c b/epan/dissectors/packet-ros.c index 99552dc7b4..9738eef66d 100644 --- a/epan/dissectors/packet-ros.c +++ b/epan/dissectors/packet-ros.c @@ -247,11 +247,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); @@ -651,16 +649,14 @@ static const value_string ros_GeneralProblem_vals[] = { static int dissect_ros_GeneralProblem(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 169 "../../asn1/ros/ros.cnf" +#line 168 "../../asn1/ros/ros.cnf" guint32 problem; offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, &problem); - 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)")); @@ -683,16 +679,14 @@ static const value_string ros_InvokeProblem_vals[] = { static int dissect_ros_InvokeProblem(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 181 "../../asn1/ros/ros.cnf" +#line 178 "../../asn1/ros/ros.cnf" guint32 problem; offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, &problem); - 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)")); @@ -710,16 +704,14 @@ static const value_string ros_ReturnResultProblem_vals[] = { static int dissect_ros_ReturnResultProblem(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 193 "../../asn1/ros/ros.cnf" +#line 188 "../../asn1/ros/ros.cnf" guint32 problem; offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, &problem); - 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)")); @@ -739,16 +731,14 @@ static const value_string ros_ReturnErrorProblem_vals[] = { static int dissect_ros_ReturnErrorProblem(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 205 "../../asn1/ros/ros.cnf" +#line 198 "../../asn1/ros/ros.cnf" guint32 problem; offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, &problem); - 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)")); @@ -801,8 +791,7 @@ dissect_ros_Reject(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, static int dissect_ros_T_reject(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 161 "../../asn1/ros/ros.cnf" - 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"); offset = dissect_ros_Reject(implicit_tag, tvb, offset, actx, tree, hf_index); @@ -1016,7 +1005,7 @@ dissect_ros_Code(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, a /*--- End of included file: packet-ros-fn.c ---*/ -#line 375 "../../asn1/ros/packet-ros-template.c" +#line 373 "../../asn1/ros/packet-ros-template.c" /* * Dissect ROS PDUs inside a PPDU. @@ -1247,7 +1236,7 @@ void proto_register_ros(void) { "OBJECT_IDENTIFIER", HFILL }}, /*--- End of included file: packet-ros-hfarr.c ---*/ -#line 493 "../../asn1/ros/packet-ros-template.c" +#line 491 "../../asn1/ros/packet-ros-template.c" }; /* List of subtrees */ @@ -1268,7 +1257,7 @@ void proto_register_ros(void) { &ett_ros_Code, /*--- End of included file: packet-ros-ettarr.c ---*/ -#line 500 "../../asn1/ros/packet-ros-template.c" +#line 498 "../../asn1/ros/packet-ros-template.c" }; static ei_register_info ei[] = { diff --git a/epan/dissectors/packet-rtse.c b/epan/dissectors/packet-rtse.c index 35c33c9e9f..47af605438 100644 --- a/epan/dissectors/packet-rtse.c +++ b/epan/dissectors/packet-rtse.c @@ -1001,7 +1001,7 @@ void proto_register_rtse(void) { NULL, HFILL }}, /*--- End of included file: packet-rtse-hfarr.c ---*/ -#line 354 "../../asn1/rtse/packet-rtse-template.c" +#line 353 "../../asn1/rtse/packet-rtse-template.c" }; /* List of subtrees */ @@ -1023,7 +1023,7 @@ void proto_register_rtse(void) { &ett_rtse_CallingSSuserReference, /*--- End of included file: packet-rtse-ettarr.c ---*/ -#line 363 "../../asn1/rtse/packet-rtse-template.c" +#line 362 "../../asn1/rtse/packet-rtse-template.c" }; static ei_register_info ei[] = { diff --git a/epan/dissectors/packet-sbc-ap.c b/epan/dissectors/packet-sbc-ap.c index d6287e47c0..3a1060dbc7 100644 --- a/epan/dissectors/packet-sbc-ap.c +++ b/epan/dissectors/packet-sbc-ap.c @@ -261,8 +261,7 @@ dissect_sbc_ap_ProcedureCode(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx 0U, 255U, &ProcedureCode, FALSE); #line 64 "../../asn1/sbc-ap/sbc-ap.cnf" - 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")); @@ -554,7 +553,7 @@ dissect_sbc_ap_Data_Coding_Scheme(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t static int dissect_sbc_ap_PLMNidentity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 102 "../../asn1/sbc-ap/sbc-ap.cnf" +#line 101 "../../asn1/sbc-ap/sbc-ap.cnf" tvbuff_t *parameter_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -1172,12 +1171,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) { @@ -1418,7 +1416,7 @@ void proto_register_sbc_ap(void) { "UnsuccessfulOutcome_value", HFILL }}, /*--- End of included file: packet-sbc-ap-hfarr.c ---*/ -#line 155 "../../asn1/sbc-ap/packet-sbc-ap-template.c" +#line 154 "../../asn1/sbc-ap/packet-sbc-ap-template.c" }; /* List of subtrees */ @@ -1452,7 +1450,7 @@ void proto_register_sbc_ap(void) { &ett_sbc_ap_UnsuccessfulOutcome, /*--- End of included file: packet-sbc-ap-ettarr.c ---*/ -#line 161 "../../asn1/sbc-ap/packet-sbc-ap-template.c" +#line 160 "../../asn1/sbc-ap/packet-sbc-ap-template.c" }; @@ -1510,7 +1508,7 @@ proto_reg_handoff_sbc_ap(void) /*--- End of included file: packet-sbc-ap-dis-tab.c ---*/ -#line 194 "../../asn1/sbc-ap/packet-sbc-ap-template.c" +#line 193 "../../asn1/sbc-ap/packet-sbc-ap-template.c" } else { if (SctpPort != 0) { dissector_delete_uint("sctp.port", SctpPort, sbc_ap_handle); diff --git a/epan/dissectors/packet-smrse.c b/epan/dissectors/packet-smrse.c index d74806fe08..d4410ee6a0 100644 --- a/epan/dissectors/packet-smrse.c +++ b/epan/dissectors/packet-smrse.c @@ -694,7 +694,7 @@ void proto_register_smrse(void) { "SMS_Address", HFILL }}, /*--- End of included file: packet-smrse-hfarr.c ---*/ -#line 162 "../../asn1/smrse/packet-smrse-template.c" +#line 161 "../../asn1/smrse/packet-smrse-template.c" }; /* List of subtrees */ @@ -716,7 +716,7 @@ void proto_register_smrse(void) { &ett_smrse_RPAlertSC, /*--- End of included file: packet-smrse-ettarr.c ---*/ -#line 168 "../../asn1/smrse/packet-smrse-template.c" +#line 167 "../../asn1/smrse/packet-smrse-template.c" }; /* Register protocol */ diff --git a/epan/dissectors/packet-ulp.c b/epan/dissectors/packet-ulp.c index ddfca739d6..e1c6b2abe3 100644 --- a/epan/dissectors/packet-ulp.c +++ b/epan/dissectors/packet-ulp.c @@ -3489,7 +3489,7 @@ dissect_ulp_MultipleLocationIds(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *a static int dissect_ulp_T_sip_uri(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 67 "../../asn1/ulp/ulp.cnf" +#line 65 "../../asn1/ulp/ulp.cnf" offset = dissect_per_restricted_character_string(tvb, offset, actx, tree, hf_index, 1, 255, FALSE, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:./-_~%#@?", 72, NULL); @@ -3502,7 +3502,7 @@ dissect_ulp_T_sip_uri(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, p static int dissect_ulp_T_ims_public_identity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 72 "../../asn1/ulp/ulp.cnf" +#line 70 "../../asn1/ulp/ulp.cnf" offset = dissect_per_restricted_character_string(tvb, offset, actx, tree, hf_index, 1, 255, FALSE, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:./-_~%#@?", 72, NULL); @@ -3515,7 +3515,7 @@ dissect_ulp_T_ims_public_identity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t static int dissect_ulp_T_uri(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 77 "../../asn1/ulp/ulp.cnf" +#line 75 "../../asn1/ulp/ulp.cnf" offset = dissect_per_restricted_character_string(tvb, offset, actx, tree, hf_index, 1, 255, FALSE, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./-_~%#", 69, NULL); @@ -4463,7 +4463,7 @@ dissect_ulp_OCTET_STRING_SIZE_1_8192(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx static int dissect_ulp_T_rrlpPayload(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 48 "../../asn1/ulp/ulp.cnf" +#line 46 "../../asn1/ulp/ulp.cnf" tvbuff_t *rrlp_tvb; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -4483,7 +4483,7 @@ dissect_ulp_T_rrlpPayload(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U static int dissect_ulp_T_lPPPayload_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 57 "../../asn1/ulp/ulp.cnf" +#line 55 "../../asn1/ulp/ulp.cnf" tvbuff_t *lpp_tvb; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -6229,10 +6229,8 @@ guint32 UlpMessage; &UlpMessage); - if (check_col(actx->pinfo->cinfo, COL_INFO)) - { - col_append_fstr(actx->pinfo->cinfo, COL_INFO, "%s ", val_to_str(UlpMessage,ulp_UlpMessage_vals,"Unknown")); - } + col_append_fstr(actx->pinfo->cinfo, COL_INFO, "%s ", val_to_str(UlpMessage,ulp_UlpMessage_vals,"Unknown")); + return offset; diff --git a/epan/dissectors/packet-x509if.c b/epan/dissectors/packet-x509if.c index c238c5ed0c..d9664dc163 100644 --- a/epan/dissectors/packet-x509if.c +++ b/epan/dissectors/packet-x509if.c @@ -506,7 +506,7 @@ static const ber_sequence_t Attribute_sequence[] = { int dissect_x509if_Attribute(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 418 "../../asn1/x509if/x509if.cnf" +#line 417 "../../asn1/x509if/x509if.cnf" doing_attr = TRUE; register_frame_end_routine (actx->pinfo, x509if_frame_end); @@ -663,7 +663,7 @@ static const ber_sequence_t AttributeValueAssertion_sequence[] = { int dissect_x509if_AttributeValueAssertion(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 408 "../../asn1/x509if/x509if.cnf" +#line 407 "../../asn1/x509if/x509if.cnf" ava_hf_index = hf_index; last_ava = (char *)ep_alloc(MAX_AVA_STR_LEN); *last_ava = '\0'; @@ -944,7 +944,7 @@ dissect_x509if_RelativeDistinguishedName(gboolean implicit_tag _U_, tvbuff_t *tv static int dissect_x509if_RDNSequence_item(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 397 "../../asn1/x509if/x509if.cnf" +#line 396 "../../asn1/x509if/x509if.cnf" if(!dn_one_rdn) { /* this is the first element - record the top */ @@ -985,8 +985,7 @@ dissect_x509if_RDNSequence(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off 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); } |