mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof: fix category inheritance
Move the bit lower so we can use bitfields properly, and add an unmask helper to avoid all the 0xFF crap.
This commit is contained in:
@ -260,7 +260,7 @@ sysprof_categories_lookup (SysprofCategories *categories,
|
||||
for (guint i = 0; i < rules->len; i++)
|
||||
{
|
||||
const Rule *rule = &g_array_index (rules, Rule, i);
|
||||
gboolean ret = FALSE;
|
||||
gboolean ret;
|
||||
|
||||
if (rule->kind == MATCH_EXACT)
|
||||
ret = strcmp (rule->match, symbol) == 0;
|
||||
@ -268,6 +268,8 @@ sysprof_categories_lookup (SysprofCategories *categories,
|
||||
ret = g_str_has_prefix (symbol, rule->match);
|
||||
else if (rule->kind == MATCH_SUFFIX)
|
||||
ret = g_str_has_suffix (symbol, rule->match);
|
||||
else
|
||||
ret = FALSE;
|
||||
|
||||
if (ret)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user