commit | 3d865240e776374ced4ea50e6cb7f8ac92a32640 | [log] [tgz] |
---|---|---|
author | Per Andersson <per.andersson3@sonyericsson.com> | Mon Feb 21 09:55:42 2011 +0100 |
committer | Johan Redestig <johan.redestig@sonyericsson.com> | Mon Feb 21 09:55:42 2011 +0100 |
tree | 868e81c46940ff9ebf66059e4b1c6ee59b43cadc | |
parent | 7118bdec523568842e70555e353951df9f2596fd [diff] |
Adding a sanity test in the while loop in readHistory() Adding a sanity test in the while loop in readHistory() which is useful in case the file read (batterystats.bin), is corrupt. The file can get corrupt (missing end of file marker -1) if writeHistory fails for some reason. Without this change readHistory will continue looping untill an OutOfMemory is thrown. Change-Id: I3418d258e7cb99aa2f9d934c9449a19806499ce4