aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_extorport.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-09-21 09:40:16 -0400
committerNick Mathewson <nickm@torproject.org>2018-09-21 09:40:16 -0400
commit0e4c42a912d020888e811b748925362e1b3dc67b (patch)
tree90a9e0e682a06bdf1af1ea9b0940dd81e20786e2 /src/test/test_extorport.c
parenta1b0283040723474377a5746dbd01782a9b7eaa7 (diff)
parent03ef4ec466fd7f1de097a7b0244ca5bc8cc32b18 (diff)
downloadtor-0e4c42a912d020888e811b748925362e1b3dc67b.tar.gz
tor-0e4c42a912d020888e811b748925362e1b3dc67b.zip
Merge remote-tracking branch 'ahf-github/asn/bugs4700_2'
Diffstat (limited to 'src/test/test_extorport.c')
-rw-r--r--src/test/test_extorport.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/test/test_extorport.c b/src/test/test_extorport.c
index 1ac1c68d7e..71be9131c7 100644
--- a/src/test/test_extorport.c
+++ b/src/test/test_extorport.c
@@ -17,6 +17,7 @@
#include "core/or/or_connection_st.h"
#include "test/test.h"
+#include "test/test_helpers.h"
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
@@ -89,22 +90,6 @@ connection_write_to_buf_impl_replacement(const char *string, size_t len,
buf_add(conn->outbuf, string, len);
}
-static char *
-buf_get_contents(buf_t *buf, size_t *sz_out)
-{
- char *out;
- *sz_out = buf_datalen(buf);
- if (*sz_out >= ULONG_MAX)
- return NULL; /* C'mon, really? */
- out = tor_malloc(*sz_out + 1);
- if (buf_get_bytes(buf, out, (unsigned long)*sz_out) != 0) {
- tor_free(out);
- return NULL;
- }
- out[*sz_out] = '\0'; /* Hopefully gratuitous. */
- return out;
-}
-
static void
test_ext_or_write_command(void *arg)
{