fix useless use of potentially-uninitialized mode variable in sem_open
This commit is contained in:
parent
5d0965cb56
commit
6e53a6eca4
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue