mirror of
https://github.com/systemd/systemd.git
synced 2024-11-01 17:51:22 +03:00
Two small cleanups
This commit is contained in:
parent
97506e85e2
commit
0f2e01a503
@ -493,7 +493,7 @@ void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t size,
|
||||
u = nmemb;
|
||||
while (l < u) {
|
||||
idx = (l + u) / 2;
|
||||
p = (void *)(((const char *) base) + (idx * size));
|
||||
p = (const char *) base + idx * size;
|
||||
comparison = compar(key, p, arg);
|
||||
if (comparison < 0)
|
||||
u = idx;
|
||||
|
@ -234,7 +234,7 @@ static int trie_search_f(sd_hwdb *hwdb, const char *search) {
|
||||
uint8_t c;
|
||||
|
||||
for (; (c = trie_string(hwdb, node->prefix_off)[p]); p++) {
|
||||
if (c == '*' || c == '?' || c == '[')
|
||||
if (IN_SET(c, '*', '?', '['))
|
||||
return trie_fnmatch_f(hwdb, node, p, &buf, search + i + p);
|
||||
if (c != search[i + p])
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user