aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2019-03-17 17:17:20 -0700
committerGuy Harris <guy@alum.mit.edu>2019-03-18 00:17:54 +0000
commit4a9c6863221e746f4e9fcc5508f692e5dc5de936 (patch)
treea4b730f769fc29ac98fe5d18ceb0e942eca62e82
parent5a7e0b63502704882171c8292bc4d70a442cc6d0 (diff)
More constification, to squelch warnings.
capture_input_cfilter_error_message() doesn't, and shouldn't, modify or free or... the error message, so make the pointer to it a const pointer. Change-Id: Ic14ac306add328df369af4b6e149c856f4283912 Reviewed-on: https://code.wireshark.org/review/32464 Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r--capchild/capture_sync.c2
-rw-r--r--capchild/capture_sync.h2
-rw-r--r--tshark.c2
-rw-r--r--ui/capture.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/capchild/capture_sync.c b/capchild/capture_sync.c
index c3bd19cc5e..25879ebdfb 100644
--- a/capchild/capture_sync.c
+++ b/capchild/capture_sync.c
@@ -1711,7 +1711,7 @@ sync_pipe_input_cb(gint source, gpointer user_data)
message = end + 1;
}
- capture_input_cfilter_error_message(cap_session, indx, (char*)message);
+ capture_input_cfilter_error_message(cap_session, indx, message);
/* the capture child will close the sync_pipe, nothing to do for now */
break;
}
diff --git a/capchild/capture_sync.h b/capchild/capture_sync.h
index 41c566de1a..dafd787a4e 100644
--- a/capchild/capture_sync.h
+++ b/capchild/capture_sync.h
@@ -136,7 +136,7 @@ capture_input_error_message(capture_session *cap_session, char *error_msg,
*/
extern void
capture_input_cfilter_error_message(capture_session *cap_session, guint i,
- char *error_message);
+ const char *error_message);
/**
* Capture child closed its side of the pipe, report any error and
diff --git a/tshark.c b/tshark.c
index 41025d336c..ae39a3d251 100644
--- a/tshark.c
+++ b/tshark.c
@@ -2536,7 +2536,7 @@ capture_input_error_message(capture_session *cap_session _U_, char *error_msg, c
/* capture child detected an capture filter related error */
void
-capture_input_cfilter_error_message(capture_session *cap_session, guint i, char *error_message)
+capture_input_cfilter_error_message(capture_session *cap_session, guint i, const char *error_message)
{
capture_options *capture_opts = cap_session->capture_opts;
dfilter_t *rfcode = NULL;
diff --git a/ui/capture.c b/ui/capture.c
index bf248fd4b2..8e99e93253 100644
--- a/ui/capture.c
+++ b/ui/capture.c
@@ -572,7 +572,7 @@ capture_input_error_message(capture_session *cap_session, char *error_msg,
*/
void
capture_input_cfilter_error_message(capture_session *cap_session, guint i,
- char *error_message)
+ const char *error_message)
{
capture_options *capture_opts = cap_session->capture_opts;
dfilter_t *rfcode = NULL;