]> git.ipfire.org Git - collecty.git/commitdiff
sources: sensors: Reset r if there are no features
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 23 Oct 2025 16:19:56 +0000 (16:19 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 23 Oct 2025 16:19:56 +0000 (16:19 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/daemon/sources/sensors.c

index 85a190ace7cd1a478ac635f7ea9186753b3a0391..a956d42bde2f1b68129409c4be57fa940e0f3295 100644 (file)
@@ -105,6 +105,9 @@ static int find_sensors(td_ctx* ctx, td_source* source,
                // Reset the feature index
                feature_index = 0;
 
+               // Reset r
+               r = 0;
+
                // Iterate over all features
                for (;;) {
                        feature = sensors_get_features(chip, &feature_index);