Re: [PATCH] refs/files-backend: remove unused open mode parameter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



René Scharfe <l.s.r@xxxxxx> writes:

> 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.

Obviously correct.

$ git grep -e 'open.*0[0-7][0-7][0-7]' seen \*.c | grep -v CREAT

gives this one and another from reftable.

-- >8 --
Subject: [PATCH] fixup! reftable: implement stack, a mutable database of reftable files.

To be squashed into the said commit.

Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx>
---
 reftable/stack.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/reftable/stack.c b/reftable/stack.c
index 48e22a6c18..df5021ebf0 100644
--- a/reftable/stack.c
+++ b/reftable/stack.c
@@ -107,7 +107,7 @@ static int fd_read_lines(int fd, char ***namesp)
 
 int read_lines(const char *filename, char ***namesp)
 {
-	int fd = open(filename, O_RDONLY, 0644);
+	int fd = open(filename, O_RDONLY);
 	int err = 0;
 	if (fd < 0) {
 		if (errno == ENOENT) {
-- 
2.33.0-484-g4fa4683b52







[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux