Render error messages as strings instead of internal codes.
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
static void mpw_getTime(struct timeval *time) {
|
||||
|
||||
if (gettimeofday( time, NULL ) != 0)
|
||||
ftl( "Could not get time: %d\n", errno );
|
||||
ftl( "Could not get time: %s\n", strerror( errno ) );
|
||||
}
|
||||
|
||||
static const double mpw_showSpeed(struct timeval startTime, const unsigned int iterations, const char *operation) {
|
||||
@@ -64,7 +64,7 @@ int main(int argc, char *const argv[]) {
|
||||
iterations = 3000000;
|
||||
masterKey = mpw_masterKey( fullName, masterPassword, MPAlgorithmVersionCurrent );
|
||||
if (!masterKey) {
|
||||
ftl( "Could not allocate master key: %d\n", errno );
|
||||
ftl( "Could not allocate master key: %s\n", strerror( errno ) );
|
||||
abort();
|
||||
}
|
||||
mpw_getTime( &startTime );
|
||||
@@ -109,7 +109,7 @@ int main(int argc, char *const argv[]) {
|
||||
for (int i = 1; i <= iterations; ++i) {
|
||||
masterKey = mpw_masterKey( fullName, masterPassword, MPAlgorithmVersionCurrent );
|
||||
if (!masterKey) {
|
||||
ftl( "Could not allocate master key: %d\n", errno );
|
||||
ftl( "Could not allocate master key: %s\n", strerror( errno ) );
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user