aboutsummaryrefslogtreecommitdiffstats
path: root/epan/column-utils.c
diff options
context:
space:
mode:
authorkrj <krj@f5534014-38df-0310-8fa8-9805f1628bb7>2009-09-11 14:00:36 +0000
committerkrj <krj@f5534014-38df-0310-8fa8-9805f1628bb7>2009-09-11 14:00:36 +0000
commitdd433a20fb1abde172ee2d1778ff26270d507711 (patch)
tree4cec698dc54eb8ab75b872b5154a0796176fe010 /epan/column-utils.c
parent5ceb0c9e7f8130ba8561c00163908919eb16ec4b (diff)
Move some CHECK_COL to our public functions, allowing us to bail our more quickly
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29859 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/column-utils.c')
-rw-r--r--epan/column-utils.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/epan/column-utils.c b/epan/column-utils.c
index 3a86252e2a..f37466c7f7 100644
--- a/epan/column-utils.c
+++ b/epan/column-utils.c
@@ -318,15 +318,15 @@ col_custom_prime_edt(epan_dissect_t *edt, column_info *cinfo)
cinfo->col_custom_field_id[i] = -1;
if (cinfo->fmt_matx[i][COL_CUSTOM] &&
- cinfo->col_custom_dfilter[i]){
+ cinfo->col_custom_dfilter[i]){
epan_dissect_prime_dfilter(edt, cinfo->col_custom_dfilter[i]);
if (cinfo->col_custom_field) {
header_field_info* hfinfo = proto_registrar_get_byname(cinfo->col_custom_field[i]);
/* ASSERT if none ? */
- g_assert(hfinfo);
+ g_assert(hfinfo);
cinfo->col_custom_field_id[i] = hfinfo->id;
}
- }
+ }
}
}
@@ -550,9 +550,6 @@ col_do_append_str(column_info *cinfo, gint el, const gchar* separator,
int i;
size_t len, max_len, sep_len;
- if (!CHECK_COL(cinfo, el))
- return;
-
if (el == COL_INFO)
max_len = COL_MAX_INFO_LEN;
else
@@ -588,6 +585,9 @@ col_do_append_str(column_info *cinfo, gint el, const gchar* separator,
void
col_append_str(column_info *cinfo, gint el, const gchar* str)
{
+ if (!CHECK_COL(cinfo, el))
+ return;
+
col_do_append_str(cinfo, el, NULL, str);
}
@@ -595,6 +595,9 @@ void
col_append_sep_str(column_info *cinfo, gint el, const gchar* separator,
const gchar* str)
{
+ if (!CHECK_COL(cinfo, el))
+ return;
+
if (separator == NULL)
separator = ", "; /* default */
col_do_append_str(cinfo, el, separator, str);