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_main_process.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/nxt_main_process.c') diff --git a/src/nxt_main_process.c b/src/nxt_main_process.c index 060ead41..c302cb02 100644 --- a/src/nxt_main_process.c +++ b/src/nxt_main_process.c @@ -1275,13 +1275,11 @@ nxt_main_listening_socket(nxt_sockaddr_t *sa, nxt_listening_socket_t *ls) && sa->u.sockaddr_un.sun_path[0] != '\0') { char *filename; - mode_t access; nxt_thread_t *thr; filename = sa->u.sockaddr_un.sun_path; - access = (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH); - if (chmod(filename, access) != 0) { + if (chmod(filename, 0666) != 0) { ls->end = nxt_sprintf(ls->start, ls->end, "chmod(\\\"%s\\\") failed %E", filename, nxt_errno); -- cgit