From 132936ba2ec31f6ac911db178efde90cfbc42a7d Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Mon, 10 Sep 2007 20:13:55 -0600 Subject: [PATCH] fix backwards logic in System::Local assertions --- src/system.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/system.cpp b/src/system.cpp index e4dc124907..17b70720e6 100644 --- a/src/system.cpp +++ b/src/system.cpp @@ -352,8 +352,8 @@ class MySystem: public System { class Local: public System::Local { public: Local(System* s): s(s) { - int r = pthread_key_create(&key, 0); - assert(s, r); + int r UNUSED = pthread_key_create(&key, 0); + assert(s, r == 0); } virtual void* get() { @@ -361,13 +361,13 @@ class MySystem: public System { } virtual void set(void* p) { - int r = pthread_setspecific(key, p); - assert(s, r); + int r UNUSED = pthread_setspecific(key, p); + assert(s, r == 0); } virtual void dispose() { - int r = pthread_key_delete(key); - assert(s, r); + int r UNUSED = pthread_key_delete(key); + assert(s, r == 0); s->free(this); }