All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] refs/files-backend: remove unused open mode parameter
@ 2021-09-09 21:45 René Scharfe
  2021-09-10  0:45 ` Junio C Hamano
  2021-09-13 10:12 ` Han-Wen Nienhuys
  0 siblings, 2 replies; 5+ messages in thread
From: René Scharfe @ 2021-09-09 21:45 UTC (permalink / raw)
  To: Git List; +Cc: Junio C Hamano

We only need to provide a mode if we are willing to let open(2) create
the file, which is not the case here, so drop the unnecessary parameter.

Signed-off-by: René Scharfe <l.s.r@web.de>
---
 refs/files-backend.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/refs/files-backend.c b/refs/files-backend.c
index 677b7e4cdd..74c0385873 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -1569,7 +1569,7 @@ static int log_ref_setup(struct files_ref_store *refs,
 			goto error;
 		}
 	} else {
-		*logfd = open(logfile, O_APPEND | O_WRONLY, 0666);
+		*logfd = open(logfile, O_APPEND | O_WRONLY);
 		if (*logfd < 0) {
 			if (errno == ENOENT || errno == EISDIR) {
 				/*
--
2.33.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-09-13 19:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-09 21:45 [PATCH] refs/files-backend: remove unused open mode parameter René Scharfe
2021-09-10  0:45 ` Junio C Hamano
2021-09-13 10:12 ` Han-Wen Nienhuys
2021-09-13 18:22   ` Junio C Hamano
2021-09-13 19:03     ` Jeff King

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.