fix useless use of potentially-uninitialized mode variable in sem_open
authorRich Felker <dalias@aerifal.cx>
Sun, 26 Jun 2011 20:34:05 +0000 (16:34 -0400)
committerRich Felker <dalias@aerifal.cx>
Sun, 26 Jun 2011 20:34:05 +0000 (16:34 -0400)
src/thread/sem_open.c

index 809925d..d8d6839 100644 (file)
@@ -93,7 +93,7 @@ sem_t *sem_open(const char *name, int flags, ...)
 
        for (;;) {
                if (!(flags & O_EXCL)) {
 
        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);
                        if (fd >= 0 || errno != ENOENT) {
                                if (flags & O_CREAT) {
                                        close(dir);