projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
094bea1
)
Get rid of a compiler warning with gcc 4.6.3
author
Dan Fandrich
<dan@coneharvesters.com>
Mon, 18 Mar 2013 22:17:16 +0000
(23:17 +0100)
committer
Florian Forster
<octo@collectd.org>
Sat, 23 Mar 2013 09:19:01 +0000
(10:19 +0100)
...a futile warning that nevertheless kills the build thanks
to -Werror: "variable 'status' set but not used"
Signed-off-by: Florian Forster <octo@collectd.org>
src/utils_rrdcreate.c
patch
|
blob
|
history
diff --git
a/src/utils_rrdcreate.c
b/src/utils_rrdcreate.c
index
3b8f342
..
a34e0da
100644
(file)
--- a/
src/utils_rrdcreate.c
+++ b/
src/utils_rrdcreate.c
@@
-463,9
+463,8
@@
static int lock_file (char const *filename) /* {{{ */
return (EEXIST);
}
- errno = 0;
status = stat (filename, &sb);
- if (
errno != ENOENT
)
+ if (
(status == 0) || (errno != ENOENT)
)
{
pthread_mutex_unlock (&async_creation_lock);
return (EEXIST);