summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2f6fd08)
raw | patch | inline | side by side (parent: 2f6fd08)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sat, 18 Oct 2008 22:32:19 +0000 (22:32 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sat, 18 Oct 2008 22:32:19 +0000 (22:32 +0000) |
Removed unnecessary "mode" varaible. The mode is only used when O_CREAT is
specified, where we want to use 0666 (as rrd_create_fn did r<=1612).
--kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1620 a5681a0c-68f1-0310-ab6d-d61299d08faa
specified, where we want to use 0666 (as rrd_create_fn did r<=1612).
--kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1620 a5681a0c-68f1-0310-ab6d-d61299d08faa
program/src/rrd_open.c | patch | blob | history |
diff --git a/program/src/rrd_open.c b/program/src/rrd_open.c
index 101e3c3d03a27e82770d67d9db6b0f5f53138ad4..a83031a99cf40694129157fcee55400594e74202 100644 (file)
--- a/program/src/rrd_open.c
+++ b/program/src/rrd_open.c
{
int i;
int flags = 0;
- mode_t mode = S_IRUSR;
int version;
#ifdef HAVE_MMAP
#endif
} else {
if (rdwr & RRD_READWRITE) {
- mode |= S_IWUSR;
flags |= O_RDWR;
#ifdef HAVE_MMAP
rrd_simple_file->mm_flags = MAP_SHARED;
flags |= O_BINARY;
#endif
- if ((rrd_simple_file->fd = open(file_name, flags, mode)) < 0) {
+ if ((rrd_simple_file->fd = open(file_name, flags, 0666)) < 0) {
rrd_set_error("opening '%s': %s", file_name, rrd_strerror(errno));
goto out_free;
}