projects
/
breezed.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
automatic commit
[breezed.git]
/
breezed.cc
diff --git
a/breezed.cc
b/breezed.cc
index
19e500c
..
6f079b2
100644
(file)
--- a/
breezed.cc
+++ b/
breezed.cc
@@
-61,7
+61,7
@@
int last_level = -1;
int file_fan_fd;
int file_fan_fd;
-int nb_temperature_thresholds
= 0
;
+int nb_temperature_thresholds;
int *temperature_thresholds = 0;
int nb_file_thermal = 0;
int *temperature_thresholds = 0;
int nb_file_thermal = 0;
@@
-148,6
+148,8
@@
void define_temperature_thresholds(char *definition) {
exit(1);
}
exit(1);
}
+ nb_temperature_thresholds = 1;
+
char *s;
s = definition;
while(s) {
char *s;
s = definition;
while(s) {
@@
-157,8
+159,10
@@
void define_temperature_thresholds(char *definition) {
temperature_thresholds = new int[nb_temperature_thresholds];
temperature_thresholds = new int[nb_temperature_thresholds];
+ temperature_thresholds[0] = -1;
+
s = definition;
s = definition;
- int k =
0
;
+ int k =
1
;
while(s) {
s = next_word(token, s, buffer_size);
temperature_thresholds[k] = atoi(token);
while(s) {
s = next_word(token, s, buffer_size);
temperature_thresholds[k] = atoi(token);
@@
-170,8
+174,6
@@
void define_temperature_thresholds(char *definition) {
}
k++;
}
}
k++;
}
-
- temperature_thresholds[0] = -1;
}
//////////////////////////////////////////////////////////////////////
}
//////////////////////////////////////////////////////////////////////