diff options
-rw-r--r-- | lib/libX11/src/UIThrStubs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libX11/src/UIThrStubs.c b/lib/libX11/src/UIThrStubs.c index 7f54aa9fe..bceb4c45e 100644 --- a/lib/libX11/src/UIThrStubs.c +++ b/lib/libX11/src/UIThrStubs.c @@ -177,6 +177,7 @@ _Xthr_once_stub_(void *id, void (*routine)(void)) routine(); done++; } + return 0; } #include <errno.h> @@ -199,8 +200,8 @@ _Xthr_key_create_stub_(unsigned int *key, void (*destructor)(void *)) free(_Xthr_keys_); return ENOMEM; } - for (i =_Xthr_last_key_; i<XTHR_KEYS_CHUNK; i++) - tmp[i] = 0; + for (i = 0; i < XTHR_KEYS_CHUNK; i++) + tmp[_Xthr_last_key_ + i] = 0; _Xthr_keys_ = tmp; } *key = _Xthr_last_key_++; |