summaryrefslogtreecommitdiff
path: root/sysdeps/mach
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 22:23:31 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 22:23:31 +0000
commit5eb39006b3582e47dd9bb5a7f19c08dfd19e66cc (patch)
tree87e4dfe77436dc50782468430fff0be0df495194 /sysdeps/mach
parent519f6620457d9f84d0125c0c7d01abebaae8efaa (diff)
parent079a3bfaa69270a4190a05f37f877e5f0dc96298 (diff)
Merge commit 'refs/top-bases/t/libc_cleanup' into t/libc_cleanup
Diffstat (limited to 'sysdeps/mach')
-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