PPP, correctly cast int to u8_t in PPPCTLS_ERRCODE in ppp_ioctl()

This commit is contained in:
Sylvain Rochet 2012-11-08 14:39:30 +01:00
parent 7f97e354b4
commit 07e72d2ac8

View File

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