aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_oom.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-08-02 13:40:19 -0400
committerNick Mathewson <nickm@torproject.org>2016-08-02 13:50:00 -0400
commit46ef4487d3914cac1aba148ec58ff271bda3c636 (patch)
tree300a4fdfb5f8714ae970fe78c9bd9beeda6c378b /src/test/test_oom.c
parentcd9d39d54bbc9998938e9acddb1ec34507fc9108 (diff)
downloadtor-46ef4487d3914cac1aba148ec58ff271bda3c636.tar.gz
tor-46ef4487d3914cac1aba148ec58ff271bda3c636.zip
Remove generic_buffer_*() functions as needless.
These functions were there so that we could abstract the differences between evbuffer and buf_t. But with the bufferevent removal, this no longer serves a purpose.
Diffstat (limited to 'src/test/test_oom.c')
-rw-r--r--src/test/test_oom.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/test_oom.c b/src/test/test_oom.c
index 59dfbc0ca1..6da8687def 100644
--- a/src/test/test_oom.c
+++ b/src/test/test_oom.c
@@ -77,14 +77,14 @@ dummy_origin_circuit_new(int n_cells)
}
static void
-add_bytes_to_buf(generic_buffer_t *buf, size_t n_bytes)
+add_bytes_to_buf(buf_t *buf, size_t n_bytes)
{
char b[3000];
while (n_bytes) {
size_t this_add = n_bytes > sizeof(b) ? sizeof(b) : n_bytes;
crypto_rand(b, this_add);
- generic_buffer_add(buf, b, this_add);
+ write_to_buf(b, this_add, buf);
n_bytes -= this_add;
}
}
@@ -94,7 +94,7 @@ dummy_edge_conn_new(circuit_t *circ,
int type, size_t in_bytes, size_t out_bytes)
{
edge_connection_t *conn;
- generic_buffer_t *inbuf, *outbuf;
+ buf_t *inbuf, *outbuf;
if (type == CONN_TYPE_EXIT)
conn = edge_connection_new(type, AF_INET);