projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6bd86ee
)
hddtemp: Improve robustness of test
author
Benjamin Gilbert
<bgilbert@cs.cmu.edu>
Wed, 11 Mar 2015 04:28:36 +0000
(
00:28
-0400)
committer
Benjamin Gilbert
<bgilbert@backtick.net>
Mon, 19 Sep 2016 06:35:12 +0000
(
01:35
-0500)
Don't rely on signedness of buffer_size.
src/hddtemp.c
patch
|
blob
|
history
diff --git
a/src/hddtemp.c
b/src/hddtemp.c
index
4e275dc
..
1178537
100644
(file)
--- a/
src/hddtemp.c
+++ b/
src/hddtemp.c
@@
-171,7
+171,7
@@
static char *hddtemp_query_daemon (void)
buffer_fill = 0;
while (1)
{
- if (
buffer_fill >= buffer_size - 1
)
+ if (
(buffer_size == 0) || (buffer_fill >= buffer_size - 1)
)
{
if (buffer_size == 0)
buffer_size = 1024;