summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas H. P. Andersen <phomes@gmail.com>2016-10-27 03:22:26 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-10-26 21:22:26 -0400
commit342d3ac165680197efe7973efbe08f7eb12b6b11 (patch)
tree59101053c752f6dacdd45e58839f6678d81a38d5 /src
parenta5eebcff3732e2f6d29f330c3d75912f09333462 (diff)
hwdb: fix error check of wrong variable (#4499)
We updated 'fn' but checked 'v' instead. From 698c5a17 Spotted with PVS
Diffstat (limited to 'src')
-rw-r--r--src/hwdb/hwdb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/hwdb/hwdb.c b/src/hwdb/hwdb.c
index be4ef5f9e9..ab1feb435b 100644
--- 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 = {