summaryrefslogtreecommitdiff
path: root/src/thread
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-04-19 13:16:59 -0400
committerRich Felker <dalias@aerifal.cx>2011-04-19 13:16:59 -0400
commit4f24994920cf3c8a9a6f60d4573a7673a3095b02 (patch)
tree7208f4a3ae8ec0e95597d8beea3d1620ccbd177a /src/thread
parent43ee4df3384853a9c53f4f45b31d190ff9b0d7f0 (diff)
downloadmusl-4f24994920cf3c8a9a6f60d4573a7673a3095b02.tar.gz
fix uninitialized waiters field in semaphores
Diffstat (limited to 'src/thread')
-rw-r--r--src/thread/sem_init.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/thread/sem_init.c b/src/thread/sem_init.c
index 70f06e9f..e8e419cf 100644
--- a/src/thread/sem_init.c
+++ b/src/thread/sem_init.c
@@ -9,5 +9,6 @@ int sem_init(sem_t *sem, int pshared, unsigned value)
return -1;
}
sem->__val[0] = value;
+ sem->__val[1] = 0;
return 0;
}