Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 211682
b: refs/heads/master
c: 4419aae
h: refs/heads/master
v: v3
  • Loading branch information
Eric Paris authored and James Morris committed Oct 20, 2010
1 parent 783baf2 commit 0729d5b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b28efd54d9d5c8005a29cd8782335beb9daaa32d
refs/heads/master: 4419aae1f4f380a3fba0f4f12ffbbbdf3f267c51
16 changes: 13 additions & 3 deletions trunk/security/selinux/ss/policydb.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,19 @@ static u32 rangetr_hash(struct hashtab *h, const void *k)
static int rangetr_cmp(struct hashtab *h, const void *k1, const void *k2)
{
const struct range_trans *key1 = k1, *key2 = k2;
return (key1->source_type != key2->source_type ||
key1->target_type != key2->target_type ||
key1->target_class != key2->target_class);
int v;

v = key1->source_type - key2->source_type;
if (v)
return v;

v = key1->target_type - key2->target_type;
if (v)
return v;

v = key1->target_class - key2->target_class;

return v;
}

/*
Expand Down

0 comments on commit 0729d5b

Please sign in to comment.