diff options
Diffstat (limited to 'security/selinux/ss/hashtab.c')
| -rw-r--r-- | security/selinux/ss/hashtab.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/security/selinux/ss/hashtab.c b/security/selinux/ss/hashtab.c index 2e7788e13213..933e735bb185 100644 --- a/security/selinux/ss/hashtab.c +++ b/security/selinux/ss/hashtab.c | |||
| @@ -81,7 +81,7 @@ void *hashtab_search(struct hashtab *h, const void *key) | |||
| 81 | 81 | ||
| 82 | hvalue = h->hash_value(h, key); | 82 | hvalue = h->hash_value(h, key); |
| 83 | cur = h->htable[hvalue]; | 83 | cur = h->htable[hvalue]; |
| 84 | while (cur != NULL && h->keycmp(h, key, cur->key) > 0) | 84 | while (cur && h->keycmp(h, key, cur->key) > 0) |
| 85 | cur = cur->next; | 85 | cur = cur->next; |
| 86 | 86 | ||
| 87 | if (cur == NULL || (h->keycmp(h, key, cur->key) != 0)) | 87 | if (cur == NULL || (h->keycmp(h, key, cur->key) != 0)) |
| @@ -100,7 +100,7 @@ void hashtab_destroy(struct hashtab *h) | |||
| 100 | 100 | ||
| 101 | for (i = 0; i < h->size; i++) { | 101 | for (i = 0; i < h->size; i++) { |
| 102 | cur = h->htable[i]; | 102 | cur = h->htable[i]; |
| 103 | while (cur != NULL) { | 103 | while (cur) { |
| 104 | temp = cur; | 104 | temp = cur; |
| 105 | cur = cur->next; | 105 | cur = cur->next; |
| 106 | kfree(temp); | 106 | kfree(temp); |
| @@ -127,7 +127,7 @@ int hashtab_map(struct hashtab *h, | |||
| 127 | 127 | ||
| 128 | for (i = 0; i < h->size; i++) { | 128 | for (i = 0; i < h->size; i++) { |
| 129 | cur = h->htable[i]; | 129 | cur = h->htable[i]; |
| 130 | while (cur != NULL) { | 130 | while (cur) { |
| 131 | ret = apply(cur->key, cur->datum, args); | 131 | ret = apply(cur->key, cur->datum, args); |
| 132 | if (ret) | 132 | if (ret) |
| 133 | return ret; | 133 | return ret; |
