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/test/test_process.c | 4 ++-- src/test/test_process_slow.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/test') diff --git a/src/test/test_process.c b/src/test/test_process.c index 17481097be..9b62862f04 100644 --- a/src/test/test_process.c +++ b/src/test/test_process.c @@ -98,7 +98,7 @@ process_mocked_write_stdin(process_t *process, buf_t *buffer) } static void -process_stdout_callback(process_t *process, char *data, size_t size) +process_stdout_callback(process_t *process, const char *data, size_t size) { tt_ptr_op(process, OP_NE, NULL); tt_ptr_op(data, OP_NE, NULL); @@ -112,7 +112,7 @@ process_stdout_callback(process_t *process, char *data, size_t size) } static void -process_stderr_callback(process_t *process, char *data, size_t size) +process_stderr_callback(process_t *process, const char *data, size_t size) { tt_ptr_op(process, OP_NE, NULL); tt_ptr_op(data, OP_NE, NULL); diff --git a/src/test/test_process_slow.c b/src/test/test_process_slow.c index b23492e972..cc7e8c5a9c 100644 --- a/src/test/test_process_slow.c +++ b/src/test/test_process_slow.c @@ -67,7 +67,7 @@ process_data_free(process_data_t *process_data) } static void -process_stdout_callback(process_t *process, char *data, size_t size) +process_stdout_callback(process_t *process, const char *data, size_t size) { tt_ptr_op(process, OP_NE, NULL); tt_ptr_op(data, OP_NE, NULL); @@ -81,7 +81,7 @@ process_stdout_callback(process_t *process, char *data, size_t size) } static void -process_stderr_callback(process_t *process, char *data, size_t size) +process_stderr_callback(process_t *process, const char *data, size_t size) { tt_ptr_op(process, OP_NE, NULL); tt_ptr_op(data, OP_NE, NULL); -- cgit v1.2.3-54-g00ecf