summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-11-01 13:21:11 -0400
committerNick Mathewson <nickm@torproject.org>2017-11-01 13:22:09 -0400
commit221f5238aed47f4436916a1da5c6f0423c7fe3e1 (patch)
tree4b2b00011366425523c9704a213301a6ced2c205
parent8c491945057fae9b22823ace92acdf997ff28a28 (diff)
downloadtor-221f5238aed47f4436916a1da5c6f0423c7fe3e1.tar.gz
tor-221f5238aed47f4436916a1da5c6f0423c7fe3e1.zip
tor_runner.c: Add a circumlocution and a caveat.
-rw-r--r--src/tools/tor_runner.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/tools/tor_runner.c b/src/tools/tor_runner.c
index ac398742dc..9ed2ee5775 100644
--- a/src/tools/tor_runner.c
+++ b/src/tools/tor_runner.c
@@ -19,6 +19,10 @@
* practice.
*/
+/* NOTE: This module is supposed to work without the standard Tor utility
+ * functions. Don't add more dependencies!
+ */
+
#include "tor_api.h"
#include "tor_api_internal.h"
@@ -73,12 +77,16 @@ tor_run_main(const tor_main_configuration_t *cfg)
return -999988;
}
+/* circumlocution to avoid getting warned about calling calloc instead of
+ * tor_calloc. */
+#define real_calloc calloc
+
static void
child(const tor_main_configuration_t *cfg)
{
/* XXXX Close unused file descriptors. */
- char **args = calloc(cfg->argc+1, sizeof(char *));
+ char **args = real_calloc(cfg->argc+1, sizeof(char *));
memcpy(args, cfg->argv, cfg->argc * sizeof(char *));
args[cfg->argc] = NULL;