From 59d8e76081d4650545382320611fa549dde28bd2 Mon Sep 17 00:00:00 2001 From: Sylvain Rochet Date: Sat, 14 Mar 2015 14:05:33 +0100 Subject: [PATCH] PPP, code cleaning, u_char to u8_t Replaced u_char to u8_t in our PPP files. --- src/include/netif/ppp/pppos.h | 6 +++--- src/netif/ppp/ppp.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/include/netif/ppp/pppos.h b/src/include/netif/ppp/pppos.h index cddb5437..16263d04 100644 --- a/src/include/netif/ppp/pppos.h +++ b/src/include/netif/ppp/pppos.h @@ -58,7 +58,7 @@ enum { /* * Extended asyncmap - allows any character to be escaped. */ -typedef u_char ext_accm[32]; +typedef u8_t ext_accm[32]; /* * PPPoS interface control block. @@ -106,11 +106,11 @@ ppp_pcb *pppos_create(struct netif *pppif, sio_fd_t fd, #if !NO_SYS && !PPP_INPROC_MULTITHREADED /* Pass received raw characters to PPPoS to be decoded through lwIP TCPIP thread. */ -err_t pppos_input_tcpip(ppp_pcb *ppp, u_char *s, int l); +err_t pppos_input_tcpip(ppp_pcb *ppp, u8_t *s, int l); #endif /* !NO_SYS && !PPP_INPROC_MULTITHREADED */ /* PPP over Serial: this is the input function to be called for received data. */ -void pppos_input(ppp_pcb *ppp, u_char* data, int len); +void pppos_input(ppp_pcb *ppp, u8_t* data, int len); #endif /* PPPOS_H */ #endif /* PPP_SUPPORT && PPPOL2TP_SUPPORT */ diff --git a/src/netif/ppp/ppp.c b/src/netif/ppp/ppp.c index 2b152e85..c9d775e7 100644 --- a/src/netif/ppp/ppp.c +++ b/src/netif/ppp/ppp.c @@ -704,7 +704,7 @@ void ppp_input(ppp_pcb *pcb, struct pbuf *pb) { for (i = 0; (protp = protocols[i]) != NULL; ++i) { if (protp->protocol == protocol) { pb = ppp_singlebuf(pb); - (*protp->input)(pcb, (u_char*)pb->payload, pb->len); + (*protp->input)(pcb, (u8_t*)pb->payload, pb->len); goto out; } #if 0 /* UNUSED @@ -737,7 +737,7 @@ void ppp_input(ppp_pcb *pcb, struct pbuf *pb) { LWIP_ASSERT("pbuf_header failed\n", 0); goto drop; } - lcp_sprotrej(pcb, (u_char*)pb->payload, pb->len); + lcp_sprotrej(pcb, (u8_t*)pb->payload, pb->len); } break; } @@ -755,7 +755,7 @@ out: /* merge a pbuf chain into one pbuf */ struct pbuf *ppp_singlebuf(struct pbuf *p) { struct pbuf *q, *b; - u_char *pl; + u8_t *pl; if(p->tot_len == p->len) { return p; @@ -768,7 +768,7 @@ struct pbuf *ppp_singlebuf(struct pbuf *p) { return p; /* live dangerously */ } - for(b = p, pl = (u_char*)q->payload; b != NULL; b = b->next) { + for(b = p, pl = (u8_t*)q->payload; b != NULL; b = b->next) { MEMCPY(pl, b->payload, b->len); pl += b->len; }