projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
02cec0e
)
utils_format_json.c: offset is unsigned
author
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Sat, 23 Apr 2016 08:41:07 +0000
(10:41 +0200)
committer
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Sat, 23 Apr 2016 08:41:07 +0000
(10:41 +0200)
[src/utils_format_json.c:300]: (style) Checking if unsigned variable 'offset' is less than zero.
src/utils_format_json.c
patch
|
blob
|
history
diff --git
a/src/utils_format_json.c
b/src/utils_format_json.c
index
2c0e4cd
..
800b421
100644
(file)
--- a/
src/utils_format_json.c
+++ b/
src/utils_format_json.c
@@
-297,7
+297,7
@@
static int meta_data_keys_to_json (char *buffer, size_t buffer_size, /* {{{ */
}
} /* for (keys) */
- if (offset
<
= 0)
+ if (offset
=
= 0)
return (ENOENT);
buffer[0] = '{'; /* replace leading ',' */