omit unused mode argument to open(2)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
diff --git a/lib/object.c b/lib/object.c
index 8abd471..0c85256 100644
--- a/lib/object.c
+++ b/lib/object.c
@@ -143,7 +143,7 @@ open_loose_object(int *fd, struct got_object_id *id,
err = object_path(&path, id, repo);
if (err)
return err;
- *fd = open(path, O_RDONLY | O_NOFOLLOW, GOT_DEFAULT_FILE_MODE);
+ *fd = open(path, O_RDONLY | O_NOFOLLOW);
if (*fd == -1) {
err = got_error_from_errno();
goto done;
@@ -422,7 +422,7 @@ got_object_open(struct got_object **obj, struct got_repository *repo,
if (err)
return err;
- fd = open(path, O_RDONLY | O_NOFOLLOW, GOT_DEFAULT_FILE_MODE);
+ fd = open(path, O_RDONLY | O_NOFOLLOW);
if (fd == -1) {
if (errno == ENOENT)
err = got_error_no_obj(id);
diff --git a/lib/pack.c b/lib/pack.c
index 92c3db0..94d6d9c 100644
--- a/lib/pack.c
+++ b/lib/pack.c
@@ -369,7 +369,7 @@ got_packidx_open(struct got_packidx **packidx, const char *path, int verify)
if (p == NULL)
return got_error_from_errno();
- p->fd = open(path, O_RDONLY | O_NOFOLLOW, GOT_DEFAULT_FILE_MODE);
+ p->fd = open(path, O_RDONLY | O_NOFOLLOW);
if (p->fd == -1)
return got_error_from_errno();
diff --git a/lib/repository.c b/lib/repository.c
index fac0482..ad65519 100644
--- a/lib/repository.c
+++ b/lib/repository.c
@@ -700,7 +700,7 @@ open_packfile(int *fd, const char *path_packfile, struct got_packidx *packidx)
{
const struct got_error *err = NULL;
- *fd = open(path_packfile, O_RDONLY | O_NOFOLLOW, GOT_DEFAULT_FILE_MODE);
+ *fd = open(path_packfile, O_RDONLY | O_NOFOLLOW);
if (*fd == -1)
return got_error_from_errno();