[Tarantool-patches] [PATCH 07/13] popen: add const qualifier to popen_write_timeout

Alexander Turenko alexander.turenko at tarantool.org
Fri Apr 10 05:50:45 MSK 2020


The buffer is for reading, we're not intend to change it.

Part of #4031
---
 src/lib/core/popen.c | 2 +-
 src/lib/core/popen.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/core/popen.c b/src/lib/core/popen.c
index 62920e0c8..dbc700287 100644
--- a/src/lib/core/popen.c
+++ b/src/lib/core/popen.c
@@ -281,7 +281,7 @@ stdX_str(unsigned int index)
  * Write data to the child stdin.
  */
 int
-popen_write_timeout(struct popen_handle *handle, void *buf,
+popen_write_timeout(struct popen_handle *handle, const void *buf,
 		    size_t count, unsigned int flags,
 		    ev_tstamp timeout)
 {
diff --git a/src/lib/core/popen.h b/src/lib/core/popen.h
index 587d6f7df..97c581c13 100644
--- a/src/lib/core/popen.h
+++ b/src/lib/core/popen.h
@@ -154,7 +154,7 @@ extern const char *
 popen_command(struct popen_handle *handle);
 
 extern int
-popen_write_timeout(struct popen_handle *handle, void *buf,
+popen_write_timeout(struct popen_handle *handle, const void *buf,
 		    size_t count, unsigned int flags,
 		    ev_tstamp timeout);
 
-- 
2.25.0



More information about the Tarantool-patches mailing list