projects
/
rrdtool.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
This patch reduces the number of time()/gettimeofday() system calls when
[rrdtool.git]
/
src
/
rrd_open.c
diff --git
a/src/rrd_open.c
b/src/rrd_open.c
index
2796506
..
f262413
100644
(file)
--- a/
src/rrd_open.c
+++ b/
src/rrd_open.c
@@
-364,6
+364,13
@@
void rrd_dontneed(
unsigned long i;
ssize_t _page_size = sysconf(_SC_PAGESIZE);
unsigned long i;
ssize_t _page_size = sysconf(_SC_PAGESIZE);
+ if (rrd_file == NULL) {
+#if defined DEBUG && DEBUG
+ fprintf (stderr, "rrd_dontneed: Argument 'rrd_file' is NULL.\n");
+#endif
+ return;
+ }
+
#if defined DEBUG && DEBUG > 1
mincore_print(rrd_file, "before");
#endif
#if defined DEBUG && DEBUG > 1
mincore_print(rrd_file, "before");
#endif