diff options
author | Alexander Færøy <ahf@torproject.org> | 2018-12-07 02:09:22 +0100 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-12-17 16:39:28 -0500 |
commit | cacdd290872420d51f880d75466f6d6e22430466 (patch) | |
tree | 11234b946d00c16fa485117749a4ec87da61a065 /src/feature/client | |
parent | ec2ae3ed8b542950dc774223607f14f524375a50 (diff) | |
download | tor-cacdd290872420d51f880d75466f6d6e22430466.tar.gz tor-cacdd290872420d51f880d75466f6d6e22430466.zip |
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
Diffstat (limited to 'src/feature/client')
-rw-r--r-- | src/feature/client/transports.c | 8 | ||||
-rw-r--r-- | src/feature/client/transports.h | 4 |
2 files changed, 8 insertions, 4 deletions
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 <b>process</b>, the data can be found in * <b>line</b> and the length of our line is given in <b>size</b>. */ 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 <b>process</b>, the data can be found in * <b>line</b> and the length of our line is given in <b>size</b>. */ 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) */ |