From cacdd290872420d51f880d75466f6d6e22430466 Mon Sep 17 00:00:00 2001 From: Alexander Færøy Date: Fri, 7 Dec 2018 02:09:22 +0100 Subject: Use `const char *` instead of `char *` for line parameter for process callbacks. This patch changes the type definition of the process callbacks to use `const char *` instead of `char *`. See: https://bugs.torproject.org/28179 --- src/feature/client/transports.c | 8 ++++++-- src/feature/client/transports.h | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'src/feature/client') diff --git a/src/feature/client/transports.c b/src/feature/client/transports.c index df7991846c..0f456ba1e6 100644 --- a/src/feature/client/transports.c +++ b/src/feature/client/transports.c @@ -1711,7 +1711,9 @@ tor_escape_str_for_pt_args(const char *string, const char *chars_to_escape) * stdout. Our process can be found in process, the data can be found in * line and the length of our line is given in size. */ STATIC void -managed_proxy_stdout_callback(process_t *process, char *line, size_t size) +managed_proxy_stdout_callback(process_t *process, + const char *line, + size_t size) { tor_assert(process); tor_assert(line); @@ -1732,7 +1734,9 @@ managed_proxy_stdout_callback(process_t *process, char *line, size_t size) * stderr. Our process can be found in process, the data can be found in * line and the length of our line is given in size. */ STATIC void -managed_proxy_stderr_callback(process_t *process, char *line, size_t size) +managed_proxy_stderr_callback(process_t *process, + const char *line, + size_t size) { tor_assert(process); tor_assert(line); diff --git a/src/feature/client/transports.h b/src/feature/client/transports.h index 88735a7211..a3994a0099 100644 --- a/src/feature/client/transports.h +++ b/src/feature/client/transports.h @@ -143,8 +143,8 @@ STATIC char* get_pt_proxy_uri(void); STATIC void free_execve_args(char **arg); -STATIC void managed_proxy_stdout_callback(process_t *, char *, size_t); -STATIC void managed_proxy_stderr_callback(process_t *, char *, size_t); +STATIC void managed_proxy_stdout_callback(process_t *, const char *, size_t); +STATIC void managed_proxy_stderr_callback(process_t *, const char *, size_t); STATIC bool managed_proxy_exit_callback(process_t *, process_exit_code_t); #endif /* defined(PT_PRIVATE) */ -- cgit v1.2.3-54-g00ecf