summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-10-01 15:14:59 +0000
committerMichael Mann <mmann78@netscape.net>2013-10-01 15:14:59 +0000
commit12dd69e0b680e4b483656b850ed33d3d47bf222e (patch)
treee8072c4eaa5542f9d9199259f81b523897ff459e
parentdf5848517fea346d72ac8fc30c6f9582bc2d66f0 (diff)
downloadwireshark-12dd69e0b680e4b483656b850ed33d3d47bf222e.tar.gz
Remove check_col.
svn path=/trunk/; revision=52316
-rw-r--r--epan/reassemble.c7
-rw-r--r--epan/wslua/wslua_pinfo.c3
-rw-r--r--epan/xdlc.c33
-rw-r--r--ui/cli/tap-protocolinfo.c2
4 files changed, 19 insertions, 26 deletions
diff --git a/epan/reassemble.c b/epan/reassemble.c
index 5c19af3cea..f9e5289a88 100644
--- a/epan/reassemble.c
+++ b/epan/reassemble.c
@@ -2316,11 +2316,8 @@ show_fragment_errs_in_col(fragment_head *fd_head, const fragment_items *fit,
{
if (fd_head->flags & (FD_OVERLAPCONFLICT
|FD_MULTIPLETAILS|FD_TOOLONGFRAGMENT) ) {
- if (check_col(pinfo->cinfo, COL_INFO)) {
- col_add_fstr(pinfo->cinfo, COL_INFO,
- "[Illegal %s]", fit->tag);
- return TRUE;
- }
+ col_add_fstr(pinfo->cinfo, COL_INFO, "[Illegal %s]", fit->tag);
+ return TRUE;
}
return FALSE;
diff --git a/epan/wslua/wslua_pinfo.c b/epan/wslua/wslua_pinfo.c
index 764aa9235d..7a5782861b 100644
--- a/epan/wslua/wslua_pinfo.c
+++ b/epan/wslua/wslua_pinfo.c
@@ -692,8 +692,7 @@ WSLUA_METHOD Column_prepend(lua_State *L) {
if (!s) WSLUA_ARG_ERROR(Column_prepend,TEXT,"must be a string");
- if (check_col(c->cinfo, c->col))
- col_prepend_fstr(c->cinfo, c->col, "%s",s);
+ col_prepend_fstr(c->cinfo, c->col, "%s",s);
return 0;
}
diff --git a/epan/xdlc.c b/epan/xdlc.c
index d11ff0e699..f9578eab3d 100644
--- a/epan/xdlc.c
+++ b/epan/xdlc.c
@@ -296,12 +296,11 @@ dissect_xdlc_control(tvbuff_t *tvb, int offset, packet_info *pinfo,
frame_type,
(control & XDLC_N_R_MASK) >> XDLC_N_R_SHIFT);
}
- if (check_col(pinfo->cinfo, COL_INFO)) {
- if (append_info) {
- col_append_str(pinfo->cinfo, COL_INFO, ", ");
- col_append_str(pinfo->cinfo, COL_INFO, info);
- } else
- col_add_str(pinfo->cinfo, COL_INFO, info);
+ if (append_info) {
+ col_append_str(pinfo->cinfo, COL_INFO, ", ");
+ col_append_str(pinfo->cinfo, COL_INFO, info);
+ } else {
+ col_add_str(pinfo->cinfo, COL_INFO, info);
}
if (xdlc_tree) {
tc = proto_tree_add_uint_format(xdlc_tree, hf_xdlc_control, tvb,
@@ -355,12 +354,11 @@ dissect_xdlc_control(tvbuff_t *tvb, int offset, packet_info *pinfo,
(is_response ? " F" : " P") :
""),
modifier);
- if (check_col(pinfo->cinfo, COL_INFO)) {
- if (append_info) {
- col_append_str(pinfo->cinfo, COL_INFO, ", ");
- col_append_str(pinfo->cinfo, COL_INFO, info);
- } else
- col_add_str(pinfo->cinfo, COL_INFO, info);
+ if (append_info) {
+ col_append_str(pinfo->cinfo, COL_INFO, ", ");
+ col_append_str(pinfo->cinfo, COL_INFO, info);
+ } else {
+ col_add_str(pinfo->cinfo, COL_INFO, info);
}
if (xdlc_tree) {
tc = proto_tree_add_uint_format(xdlc_tree, hf_xdlc_control, tvb,
@@ -407,12 +405,11 @@ dissect_xdlc_control(tvbuff_t *tvb, int offset, packet_info *pinfo,
(control & XDLC_N_R_MASK) >> XDLC_N_R_SHIFT,
(control & XDLC_N_S_MASK) >> XDLC_N_S_SHIFT);
}
- if (check_col(pinfo->cinfo, COL_INFO)) {
- if (append_info) {
- col_append_str(pinfo->cinfo, COL_INFO, ", ");
- col_append_str(pinfo->cinfo, COL_INFO, info);
- } else
- col_add_str(pinfo->cinfo, COL_INFO, info);
+ if (append_info) {
+ col_append_str(pinfo->cinfo, COL_INFO, ", ");
+ col_append_str(pinfo->cinfo, COL_INFO, info);
+ } else {
+ col_add_str(pinfo->cinfo, COL_INFO, info);
}
if (xdlc_tree) {
tc = proto_tree_add_uint_format(xdlc_tree, hf_xdlc_control, tvb,
diff --git a/ui/cli/tap-protocolinfo.c b/ui/cli/tap-protocolinfo.c
index 6138f34e50..065cbcc5fe 100644
--- a/ui/cli/tap-protocolinfo.c
+++ b/ui/cli/tap-protocolinfo.c
@@ -60,7 +60,7 @@ protocolinfo_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt, const vo
* To prevent a crash, we check whether INFO column is writable
* and, if not, we report that error and exit.
*/
- if (!check_col(pinfo->cinfo, COL_INFO)) {
+ if (!col_get_writable(pinfo->cinfo)) {
fprintf(stderr, "tshark: the proto,colinfo tap doesn't work if the INFO column isn't being printed.\n");
exit(1);
}