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
commit85e28a2fa3b53914aec4d7f8f82218d8aed199e8 (patch)
tree1316238fde8ff925cb72800c3934355c3311bec8 /libcutils/sockets_unix.cpp
parent764be4908b6fbd2a15d0acad03d55fa803171c26 (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