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
This commit is contained in:
Ingo Weinhold
2010-04-08 17:09:56 +00:00
parent 16b4b2c13b
commit baa26c5b4c
+1 -1
View File
@@ -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()