diff options
author | Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> | 2009-09-11 14:00:36 +0000 |
---|---|---|
committer | Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> | 2009-09-11 14:00:36 +0000 |
commit | 129f907f0c85a8bd04fb65153b6918437c0d3c50 (patch) | |
tree | 4cec698dc54eb8ab75b872b5154a0796176fe010 /epan/column-utils.c | |
parent | 3a100b0cd80c348d0f98563086e27243e9a8a4c5 (diff) |
Move some CHECK_COL to our public functions, allowing us to bail our more quickly
svn path=/trunk/; revision=29859
Diffstat (limited to 'epan/column-utils.c')
-rw-r--r-- | epan/column-utils.c | 15 |
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); |