mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-08 05:57:19 +00:00
Fix ret undefined error in nsh_telnetlogin when CONFIG_NSH_LOGIN_PLATFORM enable
Change-Id: Ib1fa8ba6879a5b330201f1144a2e5827cc4b1d0a Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
72bbc27b0f
commit
c44f271195
1 changed files with 2 additions and 9 deletions
|
|
@ -176,9 +176,6 @@ int nsh_telnetlogin(FAR struct console_stdio_s *pstate)
|
|||
{
|
||||
char username[16];
|
||||
char password[16];
|
||||
#ifdef CONFIG_NSH_LOGIN_PASSWD
|
||||
int ret;
|
||||
#endif
|
||||
int i;
|
||||
|
||||
/* Present the NSH Telnet greeting */
|
||||
|
|
@ -219,13 +216,9 @@ int nsh_telnetlogin(FAR struct console_stdio_s *pstate)
|
|||
/* Verify the username and password */
|
||||
|
||||
#if defined(CONFIG_NSH_LOGIN_PASSWD)
|
||||
ret = passwd_verify(username, password);
|
||||
if (PASSWORD_VERIFY_MATCH(ret))
|
||||
|
||||
if (PASSWORD_VERIFY_MATCH(passwd_verify(username, password)))
|
||||
#elif defined(CONFIG_NSH_LOGIN_PLATFORM)
|
||||
ret = platform_user_verify(username, password);
|
||||
if (PASSWORD_VERIFY_MATCH(ret))
|
||||
|
||||
if (PASSWORD_VERIFY_MATCH(platform_user_verify(username, password)))
|
||||
#elif defined(CONFIG_NSH_LOGIN_FIXED)
|
||||
if (strcmp(password, CONFIG_NSH_LOGIN_PASSWORD) == 0 &&
|
||||
strcmp(username, CONFIG_NSH_LOGIN_USERNAME) == 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue