summaryrefslogtreecommitdiff
path: root/sysdeps/mach
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 22:23:23 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 22:23:23 +0000
commit079a3bfaa69270a4190a05f37f877e5f0dc96298 (patch)
tree5fbe5edfd94bc0a7932f5766a7c211250973c9da /sysdeps/mach
parent68e2fa8ed9dbf0edfdaed0310801e764c12af46e (diff)
parent34c05d577bbe53f935411cf705a780df13e29aac (diff)
Merge commit 'refs/top-bases/t/gsync-libc' into t/gsync-libc
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