aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/profinet/packet-dcerpc-pn-io.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2013-10-29 14:09:20 +0000
committerBill Meier <wmeier@newsguy.com>2013-10-29 14:09:20 +0000
commit0ad98563a24b8685545825aac889ef43bfc58809 (patch)
treed44e5d34582bc2a05ba6be6bd8d818e9a813147f /plugins/profinet/packet-dcerpc-pn-io.c
parent86c145ecb33495023a7966030faab5a69a3067eb (diff)
From didier gautheron: remove redundant or use faster col_xxx functions
- when the text parameter is constant col_add_str() and col_set_str() are equivalent but col_set_str() is faster. - same for replace col_append_fstr and col_append_str - remove col_clear() when it's redundant: + before a col_set/col_add if the dissector can't throw an exception. - replace col_append() after a col_clear() with faster col_add... or col_set https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9344 svn path=/trunk/; revision=52948
Diffstat (limited to 'plugins/profinet/packet-dcerpc-pn-io.c')
-rw-r--r--plugins/profinet/packet-dcerpc-pn-io.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/plugins/profinet/packet-dcerpc-pn-io.c b/plugins/profinet/packet-dcerpc-pn-io.c
index 4ac139503c..477156631a 100644
--- a/plugins/profinet/packet-dcerpc-pn-io.c
+++ b/plugins/profinet/packet-dcerpc-pn-io.c
@@ -8588,8 +8588,7 @@ dissect_ProfiDriveParameterRequest(tvbuff_t *tvb, int offset,
request_reference, val_to_str(request_id, pn_io_profidrive_request_id_vals, "Unknown"),
do_id, no_of_parameters);
- col_clear(pinfo->cinfo, COL_INFO);
- col_append_fstr(pinfo->cinfo, COL_INFO, "PROFIDrive Write Request, ReqRef:0x%02x, %s DO:%u",
+ col_add_fstr(pinfo->cinfo, COL_INFO, "PROFIDrive Write Request, ReqRef:0x%02x, %s DO:%u",
request_reference,
request_id==0x01 ? "Read" :
request_id==0x02 ? "Change" :
@@ -8692,8 +8691,7 @@ dissect_ProfiDriveParameterResponse(tvbuff_t *tvb, int offset,
request_reference, val_to_str(response_id, pn_io_profidrive_response_id_vals, "Unknown"),
do_id, no_of_parameters);
- col_clear(pinfo->cinfo, COL_INFO);
- col_append_fstr(pinfo->cinfo, COL_INFO, "PROFIDrive Read Response, ReqRef:0x%02x, RspId:%s",
+ col_add_fstr(pinfo->cinfo, COL_INFO, "PROFIDrive Read Response, ReqRef:0x%02x, RspId:%s",
request_reference,
val_to_str(response_id, pn_io_profidrive_response_id_vals, "Unknown response"));