Re: [PATCH] Provide an interface for getting the current tick length

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

 




On Thu, 16 Feb 2006, Paul Mackerras wrote:
> 
> We could share the code that computes time_adjust_step, i.e. this
> much:
> 
> 	if ((time_adjust_step = time_adjust) != 0) {

And while at it, please make it much more readable by writing it as

	time_adjust_step = time_adjust;
	if (time_adjust_step) {
		..

which is even less to type (no "!= 0", no extra parenthesis, just a 
";<nl><tab>", and you've saved a whopping three bytes of source code while 
making the end result more readable, and the compiler will generate the 
same thing.

Assignments inside tests should probably be relegated entirely to loop 
constructs, where doing them outside the test changes semantics.

			Linus
-
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