summaryrefslogtreecommitdiff
path: root/libcutils/sockets_unix.cpp
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2019-11-06 00:23:34 +0000
committerYifan Hong <elsk@google.com>2019-11-06 01:40:18 +0000
commit47a6bf014d322fc712a82911788ed97c1a83cb82 (patch)
tree1316238fde8ff925cb72800c3934355c3311bec8 /libcutils/sockets_unix.cpp
parent2aabeed1fd68d119986146d74ffc6e5a7b9fdefa (diff)
healthd: Fix incorrect return check
In commit 1d4368b4943b ("[REFACTOR] healthd: BatteryMonitor use health 2.1 types"), the mapSysfsString() function was changed to return NULL instead of -1 on error. Everywher else that function is used commit 1d4368b4943b tweaked the return value check from (ret < 0) to (!ret), but one spot was missed. This patch corrects the one missed check so that we compare against null rather then negative value, since the return value can no longer be negative. This issue was found by inspection, and I've not seen an actual problem with it, but thought it should be corrected. Change-Id: I0a6564274d01276352a5dc0660b8ffbe748b5fde Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'libcutils/sockets_unix.cpp')
0 files changed, 0 insertions, 0 deletions