diff --git a/netutils/pppd/ahdlc.c b/netutils/pppd/ahdlc.c index c4cbf981a..36548e6d1 100644 --- a/netutils/pppd/ahdlc.c +++ b/netutils/pppd/ahdlc.c @@ -211,19 +211,19 @@ uint8_t ahdlc_rx(FAR struct ppp_context_s *ctx, uint8_t c) { /* Send up packet */ - ppp_upcall(ctx, (uint16_t) ctx->ahdlc_rx_buffer[0], + ppp_upcall(ctx, (uint16_t)ctx->ahdlc_rx_buffer[0], (FAR uint8_t *) & ctx->ahdlc_rx_buffer[1], - (uint16_t) (ctx->ahdlc_rx_count - 1)); + (uint16_t)(ctx->ahdlc_rx_count - 1)); } else { /* Send up packet */ ppp_upcall(ctx, - (uint16_t) (ctx->ahdlc_rx_buffer[0] << 8 | ctx-> - ahdlc_rx_buffer[1]), + (uint16_t)(ctx->ahdlc_rx_buffer[0] << 8 | ctx-> + ahdlc_rx_buffer[1]), (FAR uint8_t *) & ctx->ahdlc_rx_buffer[2], - (uint16_t) (ctx->ahdlc_rx_count - 2)); + (uint16_t)(ctx->ahdlc_rx_count - 2)); } ctx->ahdlc_tx_offline = 0; /* The remote side is alive */ @@ -400,8 +400,8 @@ uint8_t ahdlc_tx(struct ppp_context_s *ctx, uint16_t protocol, /* Write Protocol */ - ahdlc_tx_char(ctx, protocol, (uint8_t) (protocol >> 8)); - ahdlc_tx_char(ctx, protocol, (uint8_t) (protocol & 0xff)); + ahdlc_tx_char(ctx, protocol, (uint8_t)(protocol >> 8)); + ahdlc_tx_char(ctx, protocol, (uint8_t)(protocol & 0xff)); /* Write header if it exists */ @@ -432,8 +432,8 @@ uint8_t ahdlc_tx(struct ppp_context_s *ctx, uint16_t protocol, /* Send crc, lsb then msb */ i = ctx->ahdlc_tx_crc ^ 0xffff; - ahdlc_tx_char(ctx, protocol, (uint8_t) (i & 0xff)); - ahdlc_tx_char(ctx, protocol, (uint8_t) ((i >> 8) & 0xff)); + ahdlc_tx_char(ctx, protocol, (uint8_t)(i & 0xff)); + ahdlc_tx_char(ctx, protocol, (uint8_t)((i >> 8) & 0xff)); /* Write trailing 0x7e, probably not needed but it doesn't hurt */ diff --git a/netutils/pppd/ipcp.c b/netutils/pppd/ipcp.c index 9892f589e..2f8c42373 100644 --- a/netutils/pppd/ipcp.c +++ b/netutils/pppd/ipcp.c @@ -146,7 +146,7 @@ void ipcp_rx(FAR struct ppp_context_s *ctx, FAR uint8_t * buffer, /* len-=2; */ DEBUG1(("check lcplist\n")); - if (scan_packet(ctx, IPCP, g_ipcplist, buffer, bptr, (uint16_t) (len - 4))) + if (scan_packet(ctx, IPCP, g_ipcplist, buffer, bptr, (uint16_t)(len - 4))) { DEBUG1(("option was bad\n")); } @@ -212,7 +212,7 @@ void ipcp_rx(FAR struct ppp_context_s *ctx, FAR uint8_t * buffer, /* Write the reject frame */ DEBUG1(("Writing NAK frame \n")); - ahdlc_tx(IPCP, buffer, (uint16_t) (tptr - buffer)); + ahdlc_tx(IPCP, buffer, (uint16_t)(tptr - buffer)); DEBUG1(("- End NAK Write frame\n")); } else @@ -234,7 +234,7 @@ void ipcp_rx(FAR struct ppp_context_s *ctx, FAR uint8_t * buffer, /* ppp_flags |= tflag; */ DEBUG1(("SET- stuff -- are we up? c=%d dif=%d \n", - count, (uint16_t) (bptr - buffer))); + count, (uint16_t)(bptr - buffer))); /* Write the ACK frame */ @@ -481,10 +481,10 @@ void ipcp_task(FAR struct ppp_context_s *ctx, FAR uint8_t * buffer) *bptr++ = IPCP_IPADDRESS; *bptr++ = 0x6; - *bptr++ = (uint8_t) ((FAR uint8_t *) & ctx->local_ip)[0]; - *bptr++ = (uint8_t) ((FAR uint8_t *) & ctx->local_ip)[1]; - *bptr++ = (uint8_t) ((FAR uint8_t *) & ctx->local_ip)[2]; - *bptr++ = (uint8_t) ((FAR uint8_t *) & ctx->local_ip)[3]; + *bptr++ = (uint8_t)((FAR uint8_t *) & ctx->local_ip)[0]; + *bptr++ = (uint8_t)((FAR uint8_t *) & ctx->local_ip)[1]; + *bptr++ = (uint8_t)((FAR uint8_t *) & ctx->local_ip)[2]; + *bptr++ = (uint8_t)((FAR uint8_t *) & ctx->local_ip)[3]; #ifdef IPCP_GET_PRI_DNS if ((ctx->ipcp_state & IPCP_PRI_DNS_BIT) == 0) diff --git a/netutils/pppd/lcp.c b/netutils/pppd/lcp.c index 7c4fdf248..0626e70bf 100644 --- a/netutils/pppd/lcp.c +++ b/netutils/pppd/lcp.c @@ -138,7 +138,7 @@ void lcp_rx(struct ppp_context_s *ctx, uint8_t * buffer, uint16_t count) DEBUG1(("received [LCP Config Request id %u\n", id)); if (scan_packet - (ctx, (uint16_t) LCP, g_lcplist, buffer, bptr, (uint16_t) (len - 4))) + (ctx, (uint16_t)LCP, g_lcplist, buffer, bptr, (uint16_t)(len - 4))) { /* Must do the -4 here, !scan packet */ @@ -284,7 +284,7 @@ void lcp_rx(struct ppp_context_s *ctx, uint8_t * buffer, uint16_t count) /* Send packet ahdlc_txz(procol,header,data,headerlen,datalen); */ - ahdlc_tx(ctx, LCP, 0, buffer, 0, (uint16_t) (tptr - buffer)); + ahdlc_tx(ctx, LCP, 0, buffer, 0, (uint16_t)(tptr - buffer)); DEBUG1(("- end NAK Write frame\n")); } else diff --git a/netutils/pppd/pap.c b/netutils/pppd/pap.c index 04c7bf613..575020685 100644 --- a/netutils/pppd/pap.c +++ b/netutils/pppd/pap.c @@ -163,11 +163,11 @@ void pap_task(FAR struct ppp_context_s *ctx, FAR uint8_t * buffer) /* Write peer length */ - *bptr++ = (uint8_t) t; + *bptr++ = (uint8_t)t; bptr = memcpy(bptr, ctx->settings->pap_username, t); t = strlen((char *)ctx->settings->pap_password); - *bptr++ = (uint8_t) t; + *bptr++ = (uint8_t)t; bptr = memcpy(bptr, ctx->settings->pap_password, t); /* Write length */ diff --git a/netutils/pppd/ppp.c b/netutils/pppd/ppp.c index 8f6dc1d52..f604793fa 100644 --- a/netutils/pppd/ppp.c +++ b/netutils/pppd/ppp.c @@ -114,7 +114,7 @@ static void ppp_reject_protocol(FAR struct ppp_context_s *ctx, pkt->len = htons(count + 6); *((FAR uint16_t *) (&pkt->data[0])) = htons(protocol); - ahdlc_tx(ctx, LCP, buffer, 0, (uint16_t) (count + 6), 0); + ahdlc_tx(ctx, LCP, buffer, 0, (uint16_t)(count + 6), 0); } /**************************************************************************** @@ -428,7 +428,7 @@ uint16_t scan_packet(FAR struct ppp_context_s *ctx, uint16_t protocol, /* Write the reject frame */ DEBUG1(("Writing Reject frame --\n")); - ahdlc_tx(ctx, protocol, buffer, 0, (uint16_t) (tptr - buffer), 0); + ahdlc_tx(ctx, protocol, buffer, 0, (uint16_t)(tptr - buffer), 0); DEBUG1(("\nEnd writing reject \n")); }