We shouldn't really compare &new->h with anything when new ==NULL,
and gather three different if statements that all start
if (rv ...
into one large if.
Signed-off-by: Neil Brown <[email protected]>
### Diffstat output
./net/sunrpc/svcauth_unix.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff ./net/sunrpc/svcauth_unix.c~current~ ./net/sunrpc/svcauth_unix.c
--- ./net/sunrpc/svcauth_unix.c~current~ 2006-03-24 12:06:14.000000000 +1100
+++ ./net/sunrpc/svcauth_unix.c 2006-03-24 12:08:04.000000000 +1100
@@ -36,16 +36,16 @@ struct auth_domain *unix_domain_find(cha
rv = auth_domain_lookup(name, NULL);
while(1) {
- if (rv != &new->h) {
- if (new) auth_domain_put(&new->h);
+ if (rv) {
+ if (new && rv != &new->h)
+ auth_domain_put(&new->h);
+
+ if (rv->flavour != &svcauth_unix) {
+ auth_domain_put(rv);
+ return NULL;
+ }
return rv;
}
- if (rv && rv->flavour != &svcauth_unix) {
- auth_domain_put(rv);
- return NULL;
- }
- if (rv)
- return rv;
new = kmalloc(sizeof(*new), GFP_KERNEL);
if (new == NULL)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]