diff options
| author | David Woodhouse <David.Woodhouse@intel.com> | 2008-10-13 12:13:56 -0400 |
|---|---|---|
| committer | David Woodhouse <David.Woodhouse@intel.com> | 2008-10-13 12:13:56 -0400 |
| commit | e758936e02700ff88a0b08b722a3847b95283ef2 (patch) | |
| tree | 50c919bef1b459a778b85159d5929de95b6c4a01 /security/selinux/ss/hashtab.c | |
| parent | 239cfbde1f5843c4a24199f117d5f67f637d72d5 (diff) | |
| parent | 4480f15b3306f43bbb0310d461142b4e897ca45b (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
include/asm-x86/statfs.h
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; |
