Author: thebeing
Date: Wed Oct 28 21:12:43 2015
New Revision: 39105

URL: http://svn.gna.org/viewcvs/gnustep?rev=39105&view=rev
Log:
Misread the docs, readpassphrase() will in fact set errno.

Modified:
    libs/ec/trunk/EcConsole.m

Modified: libs/ec/trunk/EcConsole.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/ec/trunk/EcConsole.m?rev=39105&r1=39104&r2=39105&view=diff
==============================================================================
--- libs/ec/trunk/EcConsole.m   (original)
+++ libs/ec/trunk/EcConsole.m   Wed Oct 28 21:12:43 2015
@@ -1076,19 +1076,14 @@
       /* 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)
        {


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to