projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e388b6
)
csv plugin: fix implicit conversion warning
author
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Fri, 1 Jun 2018 12:43:49 +0000
(14:43 +0200)
committer
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Fri, 1 Jun 2018 12:43:49 +0000
(14:43 +0200)
src/csv.c:193:17: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
int len = strlen(datadir);
~~~ ^~~~~~~~~~~~~~~
src/csv.c
patch
|
blob
|
history
diff --git
a/src/csv.c
b/src/csv.c
index
be59ede
..
88726bb
100644
(file)
--- a/
src/csv.c
+++ b/
src/csv.c
@@
-190,12
+190,12
@@
static int csv_config(const char *key, const char *value) {
}
datadir = strdup(value);
if (datadir != NULL) {
-
in
t len = strlen(datadir);
+
size_
t len = strlen(datadir);
while ((len > 0) && (datadir[len - 1] == '/')) {
len--;
datadir[len] = '\0';
}
- if (len
<
= 0) {
+ if (len
=
= 0) {
free(datadir);
datadir = NULL;
}