diff dbutil.c @ 1460:58a74cb829b8

Pointer parameter could be declared as pointing to const (callback)
author Francois Perrad <francois.perrad@gadz.org>
date Sat, 19 Aug 2017 22:39:53 +0200
parents bbc0a0ee3843
children fb90a5ba84e0
line wrap: on
line diff
--- a/dbutil.c	Sat Aug 19 17:16:13 2017 +0200
+++ b/dbutil.c	Sat Aug 19 22:39:53 2017 +0200
@@ -241,7 +241,7 @@
  * it will be run after the child has fork()ed, and is passed exec_data.
  * If ret_errfd == NULL then stderr will not be captured.
  * ret_pid can be passed as  NULL to discard the pid. */
-int spawn_command(void(*exec_fn)(void *user_data), void *exec_data,
+int spawn_command(void(*exec_fn)(const void *user_data), const void *exec_data,
 		int *ret_writefd, int *ret_readfd, int *ret_errfd, pid_t *ret_pid) {
 	int infds[2];
 	int outfds[2];