From 6e53a6eca42ec40d12dced55f4840df883e2f76e Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Sun, 26 Jun 2011 16:34:05 -0400 Subject: [PATCH] fix useless use of potentially-uninitialized mode variable in sem_open --- src/thread/sem_open.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/thread/sem_open.c b/src/thread/sem_open.c index 809925d2..d8d68392 100644 --- a/src/thread/sem_open.c +++ b/src/thread/sem_open.c @@ -93,7 +93,7 @@ sem_t *sem_open(const char *name, int flags, ...) for (;;) { if (!(flags & O_EXCL)) { - fd = shm_open(name, flags&~O_CREAT, mode); + fd = shm_open(name, flags&~O_CREAT, 0); if (fd >= 0 || errno != ENOENT) { if (flags & O_CREAT) { close(dir); -- 2.25.1