From: Thomas H. P. Andersen Date: Thu, 27 Oct 2016 01:22:26 +0000 (+0200) Subject: hwdb: fix error check of wrong variable (#4499) X-Git-Tag: v234~896 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=342d3ac165680197efe7973efbe08f7eb12b6b11;p=platform%2Fupstream%2Fsystemd.git hwdb: fix error check of wrong variable (#4499) We updated 'fn' but checked 'v' instead. From 698c5a17 Spotted with PVS --- diff --git a/src/hwdb/hwdb.c b/src/hwdb/hwdb.c index be4ef5f..ab1feb4 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 = {