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:
Christian Hergert
2023-07-21 10:51:41 -07:00
parent ff5c0e4927
commit a99a89782a
4 changed files with 16 additions and 15 deletions

View File

@ -327,12 +327,6 @@ _sysprof_callgraph_categorize (SysprofCallgraph *self,
while (parent != NULL)
{
/* If we reach an uncategorized, then nothing above
* is doing inheritance.
*/
if (parent->category == SYSPROF_CALLGRAPH_CATEGORY_UNCATEGORIZED)
break;
if (parent->category & SYSPROF_CALLGRAPH_CATEGORY_INHERIT)
{
node->category = parent->category;