diff options
author | Mika Kukkonen <mika@osdl.org> | 2004-06-29 05:20:18 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-06-29 05:20:18 -0700 |
commit | 55be71cfb77dc0a0a59716be3e1ac7946245ef67 (patch) | |
tree | f4ef8f0add1a80b9755c4282cc821543caaac4be /lib | |
parent | 9e1674efe516272452bfaf9639cbeb418c92fac1 (diff) | |
download | history-55be71cfb77dc0a0a59716be3e1ac7946245ef67.tar.gz |
[PATCH] Combined patch for remaining trivial sparse warnings in allnoconfig build
Well, one of these (fs/block_dev.c) is little non-trivial, but i felt
throwing that away would be a shame (and I did add comments ;-).
Also almost all of these have been submitted earlier through other
channels, but have not been picked up (the only controversial is again the
fs/block_dev.c patch, where Linus felt a better job would be done with
__ffs(), but I could not convince myself that is does the same thing as
original code).
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/kobject.c | 2 | ||||
-rw-r--r-- | lib/rbtree.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/kobject.c b/lib/kobject.c index 5c2ade5739beb6..9b2519ee6e8cb9 100644 --- a/lib/kobject.c +++ b/lib/kobject.c @@ -37,7 +37,7 @@ static int populate_dir(struct kobject * kobj) int i; if (t && t->default_attrs) { - for (i = 0; (attr = t->default_attrs[i]); i++) { + for (i = 0; (attr = t->default_attrs[i]) != NULL; i++) { if ((error = sysfs_create_file(kobj,attr))) break; } diff --git a/lib/rbtree.c b/lib/rbtree.c index 860115d49dd3a6..61c12969be002c 100644 --- a/lib/rbtree.c +++ b/lib/rbtree.c @@ -235,7 +235,7 @@ void rb_erase(struct rb_node *node, struct rb_root *root) struct rb_node *old = node, *left; node = node->rb_right; - while ((left = node->rb_left)) + while ((left = node->rb_left) != NULL) node = left; child = node->rb_right; parent = node->rb_parent; |