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.
This commit is contained in:
Freddie Chopin 2019-12-05 22:14:09 +01:00 committed by Sylvain Rochet
parent b2d1fc119d
commit c18a8dc9cc

View File

@ -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;