Lines Matching defs:sub
489 * aa_label_next_not_in_set - return the next profile of @sub not in @set
492 * @sub: label to if is subset of @set
494 * Returns: profile in @sub that is not in @set, with iterator set pos after
495 * else NULL if @sub is a subset of @set
499 struct aa_label *sub)
505 AA_BUG(!sub);
507 AA_BUG(I->j > sub->size);
509 while (I->j < sub->size && I->i < set->size) {
510 int res = profile_cmp(sub->vec[I->j], set->vec[I->i]);
518 return sub->vec[(I->j)++];
521 if (I->j < sub->size)
522 return sub->vec[(I->j)++];
528 * aa_label_is_subset - test if @sub is a subset of @set
530 * @sub: label to test if is subset of @set
532 * Returns: true if @sub is subset of @set
535 bool aa_label_is_subset(struct aa_label *set, struct aa_label *sub)
540 AA_BUG(!sub);
542 if (sub == set)
545 return __aa_label_next_not_in_set(&i, set, sub) == NULL;
549 * aa_label_is_unconfined_subset - test if @sub is a subset of @set
551 * @sub: label to test if is subset of @set
554 * @sub contains an unconfined profile that does not have a matching
557 * @sub
559 * Returns: true if @sub is special_subset of @set
562 bool aa_label_is_unconfined_subset(struct aa_label *set, struct aa_label *sub)
568 AA_BUG(!sub);
570 if (sub == set)
574 p = __aa_label_next_not_in_set(&i, set, sub);