summaryrefslogtreecommitdiff
path: root/sysdeps/mach/hurd
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 22:23:21 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 22:23:21 +0000
commit34c05d577bbe53f935411cf705a780df13e29aac (patch)
treef29b51ff458e75e274a696f2c2c777f6c800e16a /sysdeps/mach/hurd
parent8d59503b977070aaa4e504e8d6dcb7da3711893e (diff)
parentdc45fb0ccaa2e2b7ef61d1a65ba9ace84f616f4c (diff)
Merge commit 'refs/top-bases/t/gsync-libc-merge' into t/gsync-libc-merge
Diffstat (limited to 'sysdeps/mach/hurd')
-rw-r--r--sysdeps/mach/hurd/shmget.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sysdeps/mach/hurd/shmget.c b/sysdeps/mach/hurd/shmget.c
index 2065b41989..5e05214185 100644
--- a/sysdeps/mach/hurd/shmget.c
+++ b/sysdeps/mach/hurd/shmget.c
@@ -78,11 +78,10 @@ static error_t
get_exclusive (int shmflags, size_t size, key_t *r_key, int *r_fd)
{
error_t err;
- file_t dir;
- file_t file;
+ file_t dir = MACH_PORT_NULL;
+ file_t file = MACH_PORT_NULL;
char filename[SHM_NAMEMAX];
key_t key = *r_key;
- bool is_private;
/* Create the shared memory segment. */
err = create_shm_file (size, shmflags, &dir, &file);
@@ -91,7 +90,6 @@ get_exclusive (int shmflags, size_t size, key_t *r_key, int *r_fd)
if (key == IPC_PRIVATE)
{
- is_private = true;
key = SHM_PRIV_KEY_START;
/* Try to link the shared memory segment into the filesystem