diff options
author | Sven Nierlein <sven@nierlein.org> | 2016-11-08 09:26:52 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-08 09:26:52 (GMT) |
commit | efaeecc8912db92256c80ee6e714f9752a45de00 (patch) | |
tree | 293a0d5f6ac74a41f34d77851529e4bf908d8098 /plugins/check_ide_smart.c | |
parent | 85cfc7b1aa0bc4da1248e8abf4541bf35b36b937 (diff) | |
parent | 2742e657988360a573e517bcc5345e9efae3691d (diff) | |
download | monitoring-plugins-efaeecc8912db92256c80ee6e714f9752a45de00.tar.gz |
Merge pull request #1441 from waja/check_ide_smart_remove_unused_function
check_ide_smart: remove unused function
Diffstat (limited to 'plugins/check_ide_smart.c')
-rw-r--r-- | plugins/check_ide_smart.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/plugins/check_ide_smart.c b/plugins/check_ide_smart.c index 8d540ca..4662131 100644 --- a/plugins/check_ide_smart.c +++ b/plugins/check_ide_smart.c | |||
@@ -166,7 +166,6 @@ enum SmartCommand | |||
166 | 166 | ||
167 | char *get_offline_text (int); | 167 | char *get_offline_text (int); |
168 | int smart_read_values (int, values_t *); | 168 | int smart_read_values (int, values_t *); |
169 | int values_not_passed (values_t *, thresholds_t *); | ||
170 | int nagios (values_t *, thresholds_t *); | 169 | int nagios (values_t *, thresholds_t *); |
171 | void print_value (value_t *, threshold_t *); | 170 | void print_value (value_t *, threshold_t *); |
172 | void print_values (values_t *, thresholds_t *); | 171 | void print_values (values_t *, thresholds_t *); |
@@ -340,31 +339,6 @@ smart_read_values (int fd, values_t * values) | |||
340 | 339 | ||
341 | 340 | ||
342 | int | 341 | int |
343 | values_not_passed (values_t * p, thresholds_t * t) | ||
344 | { | ||
345 | value_t * value = p->values; | ||
346 | threshold_t * threshold = t->thresholds; | ||
347 | int failed = 0; | ||
348 | int passed = 0; | ||
349 | int i; | ||
350 | for (i = 0; i < NR_ATTRIBUTES; i++) { | ||
351 | if (value->id && threshold->id && value->id == threshold->id) { | ||
352 | if (value->value < threshold->threshold) { | ||
353 | ++failed; | ||
354 | } | ||
355 | else { | ||
356 | ++passed; | ||
357 | } | ||
358 | } | ||
359 | ++value; | ||
360 | ++threshold; | ||
361 | } | ||
362 | return (passed ? -failed : 2); | ||
363 | } | ||
364 | |||
365 | |||
366 | |||
367 | int | ||
368 | nagios (values_t * p, thresholds_t * t) | 342 | nagios (values_t * p, thresholds_t * t) |
369 | { | 343 | { |
370 | value_t * value = p->values; | 344 | value_t * value = p->values; |