aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-11-22 10:15:07 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-11-22 10:15:07 -0800
commit7af6ac4d14404cbc9bf49e7761ec745e6c3dd773 (patch)
treebd8a073145e6e894af308086c05b8361ee0a197e /src
parent08fd4f470e70b68d288370833524cfe49e9e369d (diff)
fix pthread_setspecific on values of null
Diffstat (limited to 'src')
-rw-r--r--src/library.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/library.js b/src/library.js
index 8425a10f..3df61724 100644
--- a/src/library.js
+++ b/src/library.js
@@ -6963,7 +6963,7 @@ LibraryManager.library = {
pthread_setspecific__deps: ['$PTHREAD_SPECIFIC', '$ERRNO_CODES'],
pthread_setspecific: function(key, value) {
- if (value == 0) {
+ if (!(key in PTHREAD_SPECIFIC)) {
return ERRNO_CODES.EINVAL;
}
PTHREAD_SPECIFIC[key] = value;