From c5021bdc4d12ce3b1bf75652367acb9d84960d08 Mon Sep 17 00:00:00 2001 From: Freddie Chopin Date: Thu, 5 Dec 2019 21:57:39 +0100 Subject: [PATCH] PPP, PPPoS: Use `const void*` instead of `u8_t*` in pppos_input_tcpip() There is no good reason why this function should take a non-const pointer. While changing that also switch to a more generic `void*` instead of "byte". --- src/include/netif/ppp/pppos.h | 2 +- src/netif/ppp/pppos.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/include/netif/ppp/pppos.h b/src/include/netif/ppp/pppos.h index 31abfa17..0401d9ff 100644 --- a/src/include/netif/ppp/pppos.h +++ b/src/include/netif/ppp/pppos.h @@ -102,7 +102,7 @@ ppp_pcb *pppos_create(struct netif *pppif, pppos_output_cb_fn output_cb, #if !NO_SYS && !PPP_INPROC_IRQ_SAFE /* Pass received raw characters to PPPoS to be decoded through lwIP TCPIP thread. */ -err_t pppos_input_tcpip(ppp_pcb *ppp, u8_t *s, int l); +err_t pppos_input_tcpip(ppp_pcb *ppp, const void *s, int l); #endif /* !NO_SYS && !PPP_INPROC_IRQ_SAFE */ /* PPP over Serial: this is the input function to be called for received data. */ diff --git a/src/netif/ppp/pppos.c b/src/netif/ppp/pppos.c index f5fea002..1eb93430 100644 --- a/src/netif/ppp/pppos.c +++ b/src/netif/ppp/pppos.c @@ -422,7 +422,7 @@ pppos_destroy(ppp_pcb *ppp, void *ctx) * @param l length of received data */ err_t -pppos_input_tcpip(ppp_pcb *ppp, u8_t *s, int l) +pppos_input_tcpip(ppp_pcb *ppp, const void *s, int l) { struct pbuf *p; err_t err;