projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
network plugin: Avoid "status may be used uninitialized" warning.
[collectd.git]
/
src
/
utils_latency.c
diff --git
a/src/utils_latency.c
b/src/utils_latency.c
index
470fbb8
..
dfdef61
100644
(file)
--- a/
src/utils_latency.c
+++ b/
src/utils_latency.c
@@
-227,7
+227,7
@@
cdtime_t latency_counter_get_percentile (latency_counter_t *lc,
int sum;
size_t i;
- if ((lc == NULL) || !((percent > 0.0) && (percent < 100.0)))
+ if ((lc == NULL) ||
(lc->num == 0) ||
!((percent > 0.0) && (percent < 100.0)))
return (0);
/* Find index i so that at least "percent" events are within i+1 ms. */