[PATCH][delayacct] Clean up coding style in taskstats interface (was Re: [updated] [Patch 5/8] taskstats interface)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 08, 2006 at 02:31:39PM -0700, Andrew Morton wrote:
> Balbir Singh <[email protected]> wrote:
> >
> > +
> > +	if ((rc = genl_register_ops(&family, &taskstats_ops)) < 0)
> > +		goto err;
> 
> 	rc = genl_register_ops(&family, &taskstats_ops);
> 	if (rc < 0)
> 		goto err;
> 
> please.

Sure, here you go Andrew

I have updated the coding style as per your suggestion

	Balbir Singh,
	Linux Technology Center,
	IBM Software Labs


Changelog

1. Split the complex if condition into
   a. function call
   b. check return status for error

Signed-off-by: Balbir Singh <[email protected]>
---

 kernel/taskstats.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff -puN kernel/taskstats.c~taskstats-interface-coding-style-cleanup kernel/taskstats.c
--- linux-2.6.17-rc3/kernel/taskstats.c~taskstats-interface-coding-style-cleanup	2006-05-10 15:08:53.000000000 +0530
+++ linux-2.6.17-rc3-balbir/kernel/taskstats.c	2006-05-10 15:09:50.000000000 +0530
@@ -322,7 +322,8 @@ static int __init taskstats_init(void)
 		return rc;
 	family_registered = 1;
 
-	if ((rc = genl_register_ops(&family, &taskstats_ops)) < 0)
+	rc = genl_register_ops(&family, &taskstats_ops);
+	if (rc < 0)
 		goto err;
 
 	return 0;
_
-
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]
  Powered by Linux