Re: [PATCH] Some const for linux/time.h

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

 



On Thu, Jul 27, 2006 at 10:40:47PM +0200, Jan Engelhardt wrote:
> Hello,
> 
> 
> time compare functions do not modify their arguments, so they can 
> be marked as const (like some of the functions in time.h are already).
> 
> Signed-off-by: Jan Engelhardt <[email protected]>
> 
> diff --fast -Ndpru linux-2.6.17.7~/include/linux/time.h linux-2.6.17.7+/include/linux/time.h
> --- linux-2.6.17.7~/include/linux/time.h	2006-06-06 02:57:02.000000000 +0200
> +++ linux-2.6.17.7+/include/linux/time.h	2006-07-27 22:35:53.308571000 +0200
> @@ -33,7 +33,8 @@ struct timezone {
>  #define NSEC_PER_SEC		1000000000L
>  #define NSEC_PER_USEC		1000L
>  
> -static inline int timespec_equal(struct timespec *a, struct timespec *b)
> +static inline int timespec_equal(const struct timespec *a,
> + const struct timespec *b)

As per CodingStyle, the second line should be "placed substantially to the
right."

Josef Sipek.

-- 
Humans were created by water to transport it upward.
-
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