mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 11:57:35 +00:00
AK: Do not negate Pthread error codes for strerror()
On all systems I've checked, pthread functions return the positive error code directly.
This commit is contained in:
parent
6aea13e229
commit
cd0fb6dcc8
1 changed files with 2 additions and 2 deletions
|
@ -29,11 +29,11 @@ StackInfo::StackInfo()
|
||||||
int rc;
|
int rc;
|
||||||
pthread_attr_t attr = {};
|
pthread_attr_t attr = {};
|
||||||
if ((rc = pthread_getattr_np(pthread_self(), &attr)) != 0) {
|
if ((rc = pthread_getattr_np(pthread_self(), &attr)) != 0) {
|
||||||
fprintf(stderr, "pthread_getattr_np: %s\n", strerror(-rc));
|
fprintf(stderr, "pthread_getattr_np: %s\n", strerror(rc));
|
||||||
VERIFY_NOT_REACHED();
|
VERIFY_NOT_REACHED();
|
||||||
}
|
}
|
||||||
if ((rc = pthread_attr_getstack(&attr, (void**)&m_base, &m_size)) != 0) {
|
if ((rc = pthread_attr_getstack(&attr, (void**)&m_base, &m_size)) != 0) {
|
||||||
fprintf(stderr, "pthread_attr_getstack: %s\n", strerror(-rc));
|
fprintf(stderr, "pthread_attr_getstack: %s\n", strerror(rc));
|
||||||
VERIFY_NOT_REACHED();
|
VERIFY_NOT_REACHED();
|
||||||
}
|
}
|
||||||
pthread_attr_destroy(&attr);
|
pthread_attr_destroy(&attr);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue