From 07e72d2ac8e8cebeb3fc55a881dc328768a1e8c1 Mon Sep 17 00:00:00 2001 From: Sylvain Rochet Date: Thu, 8 Nov 2012 14:39:30 +0100 Subject: [PATCH] PPP, correctly cast int to u8_t in PPPCTLS_ERRCODE in ppp_ioctl() --- src/netif/ppp/ppp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/netif/ppp/ppp.c b/src/netif/ppp/ppp.c index bb7e7add..097c7376 100644 --- a/src/netif/ppp/ppp.c +++ b/src/netif/ppp/ppp.c @@ -1318,7 +1318,7 @@ ppp_ioctl(ppp_pcb *pcb, int cmd, void *arg) case PPPCTLS_ERRCODE: /* Set the PPP error code. */ if (arg) { - pcb->err_code = *(u8_t *)arg; + pcb->err_code = (u8_t)(*(int *)arg); return PPPERR_NONE; } return PPPERR_PARAM;