Fix clang-tidy issues

This commit is contained in:
Andrew Gaul 2019-10-24 01:09:34 -07:00
parent 2ed1671aa7
commit d818571a78
3 changed files with 4 additions and 4 deletions

View file

@ -243,6 +243,4 @@ void go_daemon(void (*fan_control)())
if(daemonize) {
syslog(LOG_INFO, "%s daemon exiting", PROGRAM_NAME);
}
return;
}

View file

@ -592,10 +592,10 @@ void mbpfan()
while(fan != NULL) {
fan->step_up = (float)( fan->fan_max_speed - fan->fan_min_speed ) /
(float)( ( max_temp - high_temp ) * ( max_temp - high_temp + 1 ) / 2 );
(float)( ( max_temp - high_temp ) * ( max_temp - high_temp + 1 ) / 2.0 );
fan->step_down = (float)( fan->fan_max_speed - fan->fan_min_speed ) /
(float)( ( max_temp - low_temp ) * ( max_temp - low_temp + 1 ) / 2 );
(float)( ( max_temp - low_temp ) * ( max_temp - low_temp + 1 ) / 2.0 );
fan = fan->next;
}

View file

@ -17,6 +17,8 @@
#ifndef _MBPFAN_H_
#define _MBPFAN_H_
#include <stdbool.h>
/** Temperature Thresholds
* low_temp - temperature below which fan speed will be at minimum
* high_temp - fan will increase speed when higher than this temperature