Skip to content

Commit

Permalink
pkg/tinydtls: remove unnecessary void casts
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikVE committed Mar 7, 2022
1 parent fb41ec0 commit 3ccedbe
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions pkg/tinydtls/contrib/sock_dtls.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*
* @author Aiman Ismail <muhammadaimanbin.ismail@haw-hamburg.de>
* @author Leandro Lanzieri <leandro.lanzieri@haw-hamburg.de>
* @author Hendrik van Essen <hendrik.ve@fu-berlin.de>
*/

#include <assert.h>
Expand Down Expand Up @@ -89,10 +90,8 @@ typedef struct ecdsa_key_assignment {
static ecdsa_key_assignment_t _ecdsa_keys[CONFIG_DTLS_CREDENTIALS_MAX];
#endif

static int _read(struct dtls_context_t *ctx, session_t *session, uint8_t *buf,
size_t len)
static int _read(struct dtls_context_t *ctx, session_t *session, uint8_t *buf, size_t len)
{
(void)session;
sock_dtls_t *sock = dtls_get_app_data(ctx);

DEBUG("sock_dtls: decrypted message arrived\n");
Expand All @@ -109,8 +108,7 @@ static int _read(struct dtls_context_t *ctx, session_t *session, uint8_t *buf,
return len;
}

static int _write(struct dtls_context_t *ctx, session_t *session, uint8_t *buf,
size_t len)
static int _write(struct dtls_context_t *ctx, session_t *session, uint8_t *buf, size_t len)
{
sock_dtls_t *sock = (sock_dtls_t *)dtls_get_app_data(ctx);
sock_udp_ep_t remote;
Expand All @@ -129,9 +127,6 @@ static int _write(struct dtls_context_t *ctx, session_t *session, uint8_t *buf,
static int _event(struct dtls_context_t *ctx, session_t *session,
dtls_alert_level_t level, unsigned short code)
{
(void)level;
(void)session;

sock_dtls_t *sock = dtls_get_app_data(ctx);
msg_t msg = { .type = code, .content.ptr = session };

Expand Down Expand Up @@ -310,7 +305,6 @@ static int _get_psk_info(struct dtls_context_t *ctx, const session_t *session,
static int _get_ecdsa_key(struct dtls_context_t *ctx, const session_t *session,
const dtls_ecdsa_key_t **result)
{
(void)session;
int ret = CREDMAN_ERROR;
sock_dtls_t *sock = (sock_dtls_t *)dtls_get_app_data(ctx);
sock_udp_ep_t ep;
Expand Down

0 comments on commit 3ccedbe

Please sign in to comment.