diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-08-17 10:22:15 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-08-17 10:22:15 +0200 |
commit | 49cb21b22d72169517c8a2137db8bcac883ad2cc (patch) | |
tree | bd6461616c4290fbe55e5d45ae70b31efc93b9d6 /src/handshake.c | |
parent | 00d7406fe26bbcbad2945a0b4e3666dd991daac4 (diff) | |
download | fastd-49cb21b22d72169517c8a2137db8bcac883ad2cc.tar fastd-49cb21b22d72169517c8a2137db8bcac883ad2cc.zip |
Make handshake records const uint8_t* instead of void*
This enforces explicit casting and thus avoids alignment problems.
Diffstat (limited to 'src/handshake.c')
-rw-r--r-- | src/handshake.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/handshake.c b/src/handshake.c index b58745c..d74436f 100644 --- a/src/handshake.c +++ b/src/handshake.c @@ -164,8 +164,8 @@ fastd_buffer_t fastd_handshake_new_reply(fastd_context_t *ctx, const fastd_hands return buffer; } -static fastd_string_stack_t* parse_string_list(uint8_t *data, size_t len) { - uint8_t *end = data+len; +static fastd_string_stack_t* parse_string_list(const uint8_t *data, size_t len) { + const uint8_t *end = data+len; fastd_string_stack_t *ret = NULL; while (data < end) { @@ -320,7 +320,7 @@ void fastd_handshake_handle(fastd_context_t *ctx, fastd_socket_t *sock, const fa const fastd_method_t *method = ctx->conf->method_default; if (handshake.records[RECORD_METHOD_NAME].data) { - method = method_from_name(ctx, handshake.records[RECORD_METHOD_NAME].data, handshake.records[RECORD_METHOD_NAME].length); + method = method_from_name(ctx, (const char*)handshake.records[RECORD_METHOD_NAME].data, handshake.records[RECORD_METHOD_NAME].length); } /* |