projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5eebcf
)
hwdb: fix error check of wrong variable (#4499)
author
Thomas H. P. Andersen
<phomes@gmail.com>
Thu, 27 Oct 2016 01:22:26 +0000
(
03:22
+0200)
committer
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Thu, 27 Oct 2016 01:22:26 +0000
(21:22 -0400)
We updated 'fn' but checked 'v' instead.
From
698c5a17
Spotted with PVS
src/hwdb/hwdb.c
patch
|
blob
|
history
diff --git
a/src/hwdb/hwdb.c
b/src/hwdb/hwdb.c
index
be4ef5f
..
ab1feb4
100644
(file)
--- a/
src/hwdb/hwdb.c
+++ b/
src/hwdb/hwdb.c
@@
-172,8
+172,8
@@
static int trie_node_add_value(struct trie *trie, struct trie_node *node,
if (v < 0)
return v;
fn = strbuf_add_string(trie->strings, filename, strlen(filename));
- if (
v
< 0)
- return
v
;
+ if (
fn
< 0)
+ return
fn
;
if (node->values_count) {
struct trie_value_entry search = {