Explorar o código

fix useless use of potentially-uninitialized mode variable in sem_open

Rich Felker %!s(int64=13) %!d(string=hai) anos
pai
achega
6e53a6eca4
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/thread/sem_open.c

+ 1 - 1
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);