From baa26c5b4c6b16bdf9402e98e27fa88f06c4aa8a Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Thu, 8 Apr 2010 17:09:56 +0000 Subject: [PATCH] Fixed "if" condition: We need to map the error code to a negative value, when it is positive. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36088 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/libs/posix_error_mapper/misc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/posix_error_mapper/misc.cpp b/src/libs/posix_error_mapper/misc.cpp index 53ed5c1df8..317b61eb62 100644 --- a/src/libs/posix_error_mapper/misc.cpp +++ b/src/libs/posix_error_mapper/misc.cpp @@ -46,7 +46,7 @@ WRAPPER_FUNCTION(void, perror, (const char* errorPrefix), // convert errno to negative error code int* error = real_errnop(); int oldError = *error; - if (*error < 0) + if (*error > 0) *error = B_TO_NEGATIVE_ERROR(*error); // call the real perror()