svn commit: r197294 - in head/sys: kern sys

Bruce Evans brde at optusnet.com.au
Fri Sep 18 14:42:11 UTC 2009


On Thu, 17 Sep 2009, Roman Divacky wrote:

> Log:
>  Fix the style of the previous commit.

This fixes half of the new style bugs on the changed lines only.

> Modified: head/sys/kern/kern_event.c
> ==============================================================================
> --- head/sys/kern/kern_event.c	Thu Sep 17 17:41:28 2009	(r197293)
> +++ head/sys/kern/kern_event.c	Thu Sep 17 17:48:13 2009	(r197294)
> @@ -145,7 +145,8 @@ static int	filt_timer(struct knote *kn,
> static int	filt_userattach(struct knote *kn);
> static void	filt_userdetach(struct knote *kn);
> static int	filt_user(struct knote *kn, long hint);
> -static void	filt_usertouch(struct knote *kn, struct kevent *kev, unsigned long type);
> +static void	filt_usertouch(struct knote *kn, struct kevent *kev,
> +		    unsigned long type);

"unsigned foo" is spelled "u_foo" in KNF.  kern/kern_event.c followed this rule
in all cases until recently.

Following this rule often (but not here) keeps line lengths below 80
characters.

> Modified: head/sys/sys/event.h
> ==============================================================================
> --- head/sys/sys/event.h	Thu Sep 17 17:41:28 2009	(r197293)
> +++ head/sys/sys/event.h	Thu Sep 17 17:48:13 2009	(r197294)
> @@ -191,7 +191,8 @@ struct filterops {
> 	int	(*f_attach)(struct knote *kn);
> 	void	(*f_detach)(struct knote *kn);
> 	int	(*f_event)(struct knote *kn, long hint);
> -	void	(*f_touch)(struct knote *kn, struct kevent *kev, unsigned long type);
> +	void	(*f_touch)(struct knote *kn, struct kevent *kev,
> +		    unsigned long type);
 	void	(*f_touch)(struct knote *kn, struct kevent *kev, u_long type);

sys/event.h also followed the rule in all cases until now.

Here, following the rule avoids the ugly split line.

Elsewhere, in recent changes the rule is no longer followed for an unsigned
int.

Bruce


More information about the svn-src-head mailing list