OSDN Git Service
(root)
/
android-x86
/
system-bt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2a399b3
)
Fix an inappropriate sscanf return value judgment
author
liuchao
<liuchao741@huawei.com>
Wed, 4 Jan 2017 02:46:06 +0000
(10:46 +0800)
committer
Marie Janssen
<jamuraa@google.com>
Wed, 4 Jan 2017 18:59:44 +0000
(18:59 +0000)
This fixes an inappropriate sscanf return value judgment that
res check here is not needed while res2 is the one that need to be checked
Test: mm -j 8
Change-Id: I3e332286c9434d5b9d01421f5f421039f84ad6c7
bta/hf_client/bta_hf_client_at.cc
patch
|
blob
|
history
diff --git
a/bta/hf_client/bta_hf_client_at.cc
b/bta/hf_client/bta_hf_client_at.cc
index
e6a7923
..
8bd55ed
100644
(file)
--- a/
bta/hf_client/bta_hf_client_at.cc
+++ b/
bta/hf_client/bta_hf_client_at.cc
@@
-1246,7
+1246,7
@@
static char* bta_hf_client_parse_clcc(tBTA_HF_CLIENT_CB* client_cb,
if (res2 == 0) {
res2 = sscanf(buffer, ",\"\",%hu%n", &type, &offset);
- if (res < 0) return NULL;
+ if (res
2
< 0) return NULL;
/* numstr is not matched in second attempt, correct this */
res2++;