diff options
author | Ian Stakenvicius <axs@gentoo.org> | 2013-01-25 10:41:41 -0500 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2013-01-28 17:42:47 -0500 |
commit | cc9cf4c078702fcb8e88fe6f00303d821aabffce (patch) | |
tree | 27005050a62cfc75461f2a09e31ec19555c22042 /src | |
parent | 3066d402f6563f971d16f479bfa77ea676c90978 (diff) |
Fix missing endian wrappers
https://bugs.freedesktop.org/show_bug.cgi?id=58067
systemd commit f4443fa5976eca51661947dd4df60847213f27fa
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/libudev/libudev-hwdb.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libudev/libudev-hwdb.c b/src/libudev/libudev-hwdb.c index 9906accf64..5248952223 100644 --- a/src/libudev/libudev-hwdb.c +++ b/src/libudev/libudev-hwdb.c @@ -169,8 +169,8 @@ static int trie_fnmatch_f(struct udev_hwdb *hwdb, const struct trie_node_f *node linebuf_rem_char(buf); } - if (node->values_count && fnmatch(linebuf_get(buf), search, 0) == 0) - for (i = 0; i < node->values_count; i++) { + if (le64toh(node->values_count) && fnmatch(linebuf_get(buf), search, 0) == 0) + for (i = 0; i < le64toh(node->values_count); i++) { err = hwdb_add_property(hwdb, trie_string(hwdb, trie_node_values(hwdb, node)[i].key_off), trie_string(hwdb, trie_node_values(hwdb, node)[i].value_off)); if (err < 0) @@ -236,7 +236,7 @@ static int trie_search_f(struct udev_hwdb *hwdb, const char *search) { if (search[i] == '\0') { size_t n; - for (n = 0; n < node->values_count; n++) { + for (n = 0; n < le64toh(node->values_count); n++) { err = hwdb_add_property(hwdb, trie_string(hwdb, trie_node_values(hwdb, node)[n].key_off), trie_string(hwdb, trie_node_values(hwdb, node)[n].value_off)); if (err < 0) |