From 8b30917c16a88582ae6b22fd2232ea3ad5f82e2b Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Wed, 5 Sep 2007 15:56:28 +0000 Subject: [PATCH] Don't print an error message when libsensors returns a feature we don't know. Just ignore that feature. git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4774 7894878c-1315-0410-8ee3-d5d059ff63e0 --- prog/sensors/chips.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/prog/sensors/chips.c b/prog/sensors/chips.c index bc9d512d..72a8fcbe 100644 --- a/prog/sensors/chips.c +++ b/prog/sensors/chips.c @@ -80,10 +80,9 @@ static void sensors_get_available_features(const sensors_chip_name *name, int indx; indx = iter->type - first_val - 1; - if (indx < 0 || indx >= size) { - printf("ERROR: Bug in sensors: index out of bound"); - return; - } + if (indx < 0 || indx >= size) + /* New feature in libsensors? Ignore. */ + continue; if (sensors_get_value(name, iter->number, &feature_vals[indx])) printf("ERROR: Can't get %s data!\n", iter->name);