aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection_or.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2012-10-02 20:39:58 -0400
committerRoger Dingledine <arma@torproject.org>2012-10-02 20:39:58 -0400
commit57b13ad5cc9423f53a105e5d0c0a83246e68adfc (patch)
treee6345ce170f83a3f9c5c6181b0b4db65bba14922 /src/or/connection_or.c
parenta80d8e09d3b5f393f2dc83148ef66c6e1d7f4015 (diff)
downloadtor-57b13ad5cc9423f53a105e5d0c0a83246e68adfc.tar.gz
tor-57b13ad5cc9423f53a105e5d0c0a83246e68adfc.zip
more consistently use [gs]et_uint8
Diffstat (limited to 'src/or/connection_or.c')
-rw-r--r--src/or/connection_or.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index 02345f98a2..dbd8757669 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -296,7 +296,7 @@ cell_pack(packed_cell_t *dst, const cell_t *src)
{
char *dest = dst->body;
set_uint16(dest, htons(src->circ_id));
- *(uint8_t*)(dest+2) = src->command;
+ set_uint8(dest+2, src->command);
memcpy(dest+3, src->payload, CELL_PAYLOAD_SIZE);
}
@@ -307,7 +307,7 @@ static void
cell_unpack(cell_t *dest, const char *src)
{
dest->circ_id = ntohs(get_uint16(src));
- dest->command = *(uint8_t*)(src+2);
+ dest->command = get_uint8(src+2);
memcpy(dest->payload, src+3, CELL_PAYLOAD_SIZE);
}