Skip to content

Commit

Permalink
Fix compiler warning
Browse files Browse the repository at this point in the history
We didn't calculate the right array size and should use the argument we
got for it.
  • Loading branch information
baruch committed Feb 19, 2024
1 parent 1d1edcf commit a425f44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/diskscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ static void ata_test_temp(disk_t *disk, ata_smart_attr_t *smart, int smart_num)
while (temp >= TEMP_THRESHOLD) {
sleep(1);
spinner_update(&spinner);
smart_num = disk_smart_attributes(&disk->dev, smart, ARRAY_SIZE(smart));
smart_num = disk_smart_attributes(&disk->dev, smart, smart_num);
if (smart_num > 0) {
temp = ata_smart_get_temperature(smart, smart_num, disk->state.ata.smart_table, &min_temp, &max_temp);
} else {
Expand Down

0 comments on commit a425f44

Please sign in to comment.