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/program@1620
a5681a0c-68f1-0310-ab6d-
d61299d08faa
{
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;
}