diff options
Diffstat (limited to 'security/selinux')
-rw-r--r-- | security/selinux/ss/policydb.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c index aa5a2fd1cc09..97fb0cf0eb69 100644 --- a/security/selinux/ss/policydb.c +++ b/security/selinux/ss/policydb.c | |||
@@ -185,9 +185,19 @@ static u32 rangetr_hash(struct hashtab *h, const void *k) | |||
185 | static int rangetr_cmp(struct hashtab *h, const void *k1, const void *k2) | 185 | static int rangetr_cmp(struct hashtab *h, const void *k1, const void *k2) |
186 | { | 186 | { |
187 | const struct range_trans *key1 = k1, *key2 = k2; | 187 | const struct range_trans *key1 = k1, *key2 = k2; |
188 | return (key1->source_type != key2->source_type || | 188 | int v; |
189 | key1->target_type != key2->target_type || | 189 | |
190 | key1->target_class != key2->target_class); | 190 | v = key1->source_type - key2->source_type; |
191 | if (v) | ||
192 | return v; | ||
193 | |||
194 | v = key1->target_type - key2->target_type; | ||
195 | if (v) | ||
196 | return v; | ||
197 | |||
198 | v = key1->target_class - key2->target_class; | ||
199 | |||
200 | return v; | ||
191 | } | 201 | } |
192 | 202 | ||
193 | /* | 203 | /* |