mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-11 18:36:41 +00:00
ppp: fix implicit conversion from size_t to u8_t
Found when compiling with VS2017
This commit is contained in:
parent
bc48eb512e
commit
bbf80b05c8
@ -236,7 +236,7 @@ static void terminate_layer(fsm *f, int nextstate) {
|
||||
*/
|
||||
void fsm_close(fsm *f, const char *reason) {
|
||||
f->term_reason = reason;
|
||||
f->term_reason_len = (reason == NULL? 0: LWIP_MIN(strlen(reason), 0xFF) );
|
||||
f->term_reason_len = (reason == NULL? 0: (u8_t)LWIP_MIN(strlen(reason), 0xFF) );
|
||||
switch( f->state ){
|
||||
case PPP_FSM_STARTING:
|
||||
f->state = PPP_FSM_INITIAL;
|
||||
|
@ -159,9 +159,9 @@ void upap_authwithpeer(ppp_pcb *pcb, const char *user, const char *password) {
|
||||
|
||||
/* Save the username and password we're given */
|
||||
pcb->upap.us_user = user;
|
||||
pcb->upap.us_userlen = LWIP_MIN(strlen(user), 0xff);
|
||||
pcb->upap.us_userlen = (u8_t)LWIP_MIN(strlen(user), 0xff);
|
||||
pcb->upap.us_passwd = password;
|
||||
pcb->upap.us_passwdlen = LWIP_MIN(strlen(password), 0xff);
|
||||
pcb->upap.us_passwdlen = (u8_t)LWIP_MIN(strlen(password), 0xff);
|
||||
pcb->upap.us_transmits = 0;
|
||||
|
||||
/* Lower layer up yet? */
|
||||
|
Loading…
Reference in New Issue
Block a user