aboutsummaryrefslogtreecommitdiff
path: root/src/or/proto_cell.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-08-08 15:54:15 -0400
committerNick Mathewson <nickm@torproject.org>2017-09-05 13:57:51 -0400
commit6ec50597231c8d72fbf796eee88e02dd9a4d0b78 (patch)
tree24001fe0eb99beb6cbaa0c2768f1df1fd4595949 /src/or/proto_cell.c
parentd61da9e61fa0ea15789464c7c3754a9af30fcbb4 (diff)
downloadtor-6ec50597231c8d72fbf796eee88e02dd9a4d0b78.tar.gz
tor-6ec50597231c8d72fbf796eee88e02dd9a4d0b78.zip
Refactor buffer APIs to put a buf_t first.
By convention, a function that frobs a foo_t should be called foo_frob, and it should have a foo_t * as its first argument. But for many of the buf_t functions, the buf_t was the final argument, which is silly.
Diffstat (limited to 'src/or/proto_cell.c')
-rw-r--r--src/or/proto_cell.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/proto_cell.c b/src/or/proto_cell.c
index 4ce38ebfc1..4485ab4e9e 100644
--- a/src/or/proto_cell.c
+++ b/src/or/proto_cell.c
@@ -57,7 +57,7 @@ fetch_var_cell_from_buf(buf_t *buf, var_cell_t **out, int linkproto)
*out = NULL;
if (buf_datalen(buf) < header_len)
return 0;
- buf_peek(hdr, header_len, buf);
+ buf_peek(buf, hdr, header_len);
command = get_uint8(hdr + circ_id_len);
if (!(cell_command_is_var_length(command, linkproto)))
@@ -74,7 +74,7 @@ fetch_var_cell_from_buf(buf_t *buf, var_cell_t **out, int linkproto)
result->circ_id = ntohs(get_uint16(hdr));
buf_drain(buf, header_len);
- buf_peek((char*) result->payload, length, buf);
+ buf_peek(buf, (char*) result->payload, length);
buf_drain(buf, length);
*out = result;