diff options
-rw-r--r-- | networking/telnet.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/networking/telnet.c b/networking/telnet.c index e1c259579..1f8a44466 100644 --- a/networking/telnet.c +++ b/networking/telnet.c | |||
@@ -44,7 +44,7 @@ | |||
44 | //config: Setting this option will forward the USER environment variable to the | 44 | //config: Setting this option will forward the USER environment variable to the |
45 | //config: remote host you are connecting to. This is useful when you need to | 45 | //config: remote host you are connecting to. This is useful when you need to |
46 | //config: log into a machine without telling the username (autologin). This | 46 | //config: log into a machine without telling the username (autologin). This |
47 | //config: option enables '-a' and '-l USER' arguments. | 47 | //config: option enables '-a' and '-l USER' options. |
48 | //config: | 48 | //config: |
49 | //config:config FEATURE_TELNET_WIDTH | 49 | //config:config FEATURE_TELNET_WIDTH |
50 | //config: bool "Enable window size autodetection" | 50 | //config: bool "Enable window size autodetection" |
@@ -643,8 +643,10 @@ int telnet_main(int argc UNUSED_PARAM, char **argv) | |||
643 | } | 643 | } |
644 | 644 | ||
645 | #if ENABLE_FEATURE_TELNET_AUTOLOGIN | 645 | #if ENABLE_FEATURE_TELNET_AUTOLOGIN |
646 | if (1 & getopt32(argv, "al:", &G.autologin)) | 646 | if (1 == getopt32(argv, "al:", &G.autologin)) { |
647 | /* Only -a without -l USER picks $USER from envvar */ | ||
647 | G.autologin = getenv("USER"); | 648 | G.autologin = getenv("USER"); |
649 | } | ||
648 | argv += optind; | 650 | argv += optind; |
649 | #else | 651 | #else |
650 | argv++; | 652 | argv++; |