summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f49370d)
raw | patch | inline | side by side (parent: f49370d)
author | Florian Forster <octo@huhu.verplant.org> | |
Mon, 6 Jul 2009 16:15:47 +0000 (18:15 +0200) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Mon, 6 Jul 2009 16:15:47 +0000 (18:15 +0200) |
src/utils_threshold.c | patch | blob | history |
diff --git a/src/utils_threshold.c b/src/utils_threshold.c
index 083a01858e5ffc80df548133e911f2720fa52525..16f9bd2eb3ccd85e81ecc44b3e5a4f15e0b033f1 100644 (file)
--- a/src/utils_threshold.c
+++ b/src/utils_threshold.c
{
if (!isnan (min) && !isnan (max))
{
- status = ssnprintf (buf, bufsize, ": Data source \"%s\" is currently "
- "%f. That is within the %s region of %f and %f%s.",
- ds->ds[ds_index].name, values[ds_index],
- (state == STATE_ERROR) ? "failure" : "warning",
- min, max,
- ((th->flags & UT_FLAG_PERCENTAGE) == UT_FLAG_PERCENTAGE) ? "%" : "" );
+ status = ssnprintf (buf, bufsize, ": Data source \"%s\" is currently "
+ "%f. That is within the %s region of %f%s and %f%s.",
+ ds->ds[ds_index].name, values[ds_index],
+ (state == STATE_ERROR) ? "failure" : "warning",
+ min, ((th->flags & UT_FLAG_PERCENTAGE) != 0) ? "%" : "",
+ max, ((th->flags & UT_FLAG_PERCENTAGE) != 0) ? "%" : "");
}
else
{
isnan (min) ? "below" : "above",
(state == STATE_ERROR) ? "failure" : "warning",
isnan (min) ? max : min,
- ((th->flags & UT_FLAG_PERCENTAGE) == UT_FLAG_PERCENTAGE) ? "%" : "" );
+ ((th->flags & UT_FLAG_PERCENTAGE) != 0) ? "%" : "");
}
}
else /* is not inverted */
(values[ds_index] < min) ? "below" : "above",
(state == STATE_ERROR) ? "failure" : "warning",
(values[ds_index] < min) ? min : max,
- ((th->flags & UT_FLAG_PERCENTAGE) == UT_FLAG_PERCENTAGE) ? "%" : "" );
+ ((th->flags & UT_FLAG_PERCENTAGE) != 0) ? "%" : "");
}
buf += status;
bufsize -= status;
return (2);
} /* }}} int ut_check_interesting */
-/* vim: set sw=2 ts=8 sts=2 tw=78 fdm=marker : */
+/* vim: set sw=2 ts=8 sts=2 tw=78 et fdm=marker : */