From c18a8dc9cc113c78475f5310abe83ccd50352374 Mon Sep 17 00:00:00 2001 From: Freddie Chopin Date: Thu, 5 Dec 2019 22:14:09 +0100 Subject: [PATCH] PPP, PPPoS: Remove useless cast from pppos_output_append() and pppos_output_last() pppos_output_cb_fn() now takes `const void*`, so there is no need to cast the payload (`void*`) to anything else. --- src/netif/ppp/pppos.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/netif/ppp/pppos.c b/src/netif/ppp/pppos.c index fcff239d..e299c7fb 100644 --- a/src/netif/ppp/pppos.c +++ b/src/netif/ppp/pppos.c @@ -849,7 +849,7 @@ pppos_output_append(pppos_pcb *pppos, err_t err, struct pbuf *nb, u8_t c, u8_t a * Sure we don't quite fill the buffer if the character doesn't * get escaped but is one character worth complicating this? */ if ((PBUF_POOL_BUFSIZE - nb->len) < 2) { - u32_t l = pppos->output_cb(pppos->ppp, (u8_t*)nb->payload, nb->len, pppos->ppp->ctx_cb); + u32_t l = pppos->output_cb(pppos->ppp, nb->payload, nb->len, pppos->ppp->ctx_cb); if (l != nb->len) { return ERR_IF; } @@ -888,7 +888,7 @@ pppos_output_last(pppos_pcb *pppos, err_t err, struct pbuf *nb, u16_t *fcs) /* Send remaining buffer if not empty */ if (nb->len > 0) { - u32_t l = pppos->output_cb(ppp, (u8_t*)nb->payload, nb->len, ppp->ctx_cb); + u32_t l = pppos->output_cb(ppp, nb->payload, nb->len, ppp->ctx_cb); if (l != nb->len) { err = ERR_IF; goto failed;