Misread the docs, readpassphrase() will in fact set errno.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/ec/trunk@39105 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Niels Grewe 2015-10-28 20:12:43 +00:00
parent 6c7e7055b9
commit 4ca4d42c6f

View file

@ -1076,19 +1076,14 @@ consoleCompleter(const char *text, int start, int end)
/* read password (glibc documentation says not to use getpass?) */
line = getpass("Password: ");
if (0 == line)
{
NSLog(@"Could not read password: %s", strerror(errno));
exit(1);
}
#else
line = readpassphrase("Password: ", &buf[0], 128, RPP_ECHO_OFF);
#endif
if (NULL == line)
{
NSLog(@"Could not read password");
NSLog(@"Could not read password: %s", strerror(errno));
exit(1);
}
#endif
p = [[NSString stringWithCString: line] stringByTrimmingSpaces];
if ([p caseInsensitiveCompare: @"quit"] == NSOrderedSame)
{