mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-15 10:10:19 +00:00
Warning cleanup
- ignoring const - declarations after statements - some C files didnt include own headers (risking them getting out of sync) Closes #1064
This commit is contained in:
committed by
TingPing
parent
9fb4eb5107
commit
f83d78dd28
@@ -53,8 +53,9 @@ void get_hwmon_chip_name(char *name)
|
||||
void get_hwmon_temp(unsigned int *value, unsigned int *sensor)
|
||||
{
|
||||
char buffer[bsize];
|
||||
FILE *fp;
|
||||
snprintf(buffer, bsize, "/sys/class/hwmon/hwmon0/device/temp%i_input", *sensor);
|
||||
FILE *fp = fopen(buffer, "r");
|
||||
fp = fopen(buffer, "r");
|
||||
if(fp != NULL) {
|
||||
if(fgets(buffer, bsize, fp) != NULL)
|
||||
*value = atoi(buffer);
|
||||
|
||||
Reference in New Issue
Block a user