PPP, correctly cast int to u8_t in PPPCTLS_ERRCODE in ppp_ioctl()
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user