summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2c53e30)
raw | patch | inline | side by side (parent: 2c53e30)
author | Sebastian Harl <sh@tokkee.org> | |
Wed, 27 Feb 2008 20:56:32 +0000 (21:56 +0100) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Wed, 27 Feb 2008 21:48:18 +0000 (22:48 +0100) |
This should not make any difference, but, in theory, this is a semantical
error, so, let's just fix it :-)
Thanks to Stefan Völkel for pointing this out.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
error, so, let's just fix it :-)
Thanks to Stefan Völkel for pointing this out.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/rrdtool.c | patch | blob | history |
diff --git a/src/rrdtool.c b/src/rrdtool.c
index 4e34d6ad0aac1bbb93a5c537d58f07e7a559a49c..ab245241146593fb278e5a3ac5a343020cedef25 100644 (file)
--- a/src/rrdtool.c
+++ b/src/rrdtool.c
static int rrd_flush (const int timeout)
{
- if (cache == NULL)
+ pthread_mutex_lock (&cache_lock);
+
+ if (cache == NULL) {
+ pthread_mutex_unlock (&cache_lock);
return (0);
+ }
- pthread_mutex_lock (&cache_lock);
rrd_cache_flush (timeout);
pthread_mutex_unlock (&cache_lock);
return (0);