From d96d583328f614c658d42f5bb0d2a0f81621327e Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Wed, 24 Apr 2024 23:31:54 +0200 Subject: Use octal instead of mode macros They are more readable. And we had a mix of both styles; there wasn't really a consistent style. Tested-by: Andrew Clayton Reviewed-by: Andrew Clayton Signed-off-by: Alejandro Colomar --- src/nxt_port_memory.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/nxt_port_memory.c') diff --git a/src/nxt_port_memory.c b/src/nxt_port_memory.c index be7688e2..ad6e97ad 100644 --- a/src/nxt_port_memory.c +++ b/src/nxt_port_memory.c @@ -393,8 +393,7 @@ nxt_shm_open(nxt_task_t *task, size_t size) #elif (NXT_HAVE_SHM_OPEN_ANON) - fd = shm_open(SHM_ANON, O_RDWR, S_IRUSR | S_IWUSR); - + fd = shm_open(SHM_ANON, O_RDWR, 0600); if (nxt_slow_path(fd == -1)) { nxt_alert(task, "shm_open(SHM_ANON) failed %E", nxt_errno); @@ -408,8 +407,7 @@ nxt_shm_open(nxt_task_t *task, size_t size) /* Just in case. */ shm_unlink((char *) name); - fd = shm_open((char *) name, O_CREAT | O_EXCL | O_RDWR, S_IRUSR | S_IWUSR); - + fd = shm_open((char *) name, O_CREAT | O_EXCL | O_RDWR, 0600); if (nxt_slow_path(fd == -1)) { nxt_alert(task, "shm_open(%s) failed %E", name, nxt_errno); -- cgit