[Swan-dev] readable C style for split control statements

Tuomo Soini tis at foobar.fi
Mon Oct 1 15:21:24 UTC 2018


On Sun, 30 Sep 2018 15:52:11 -0400 (EDT)
"D. Hugh Redelmeier" <hugh at mimosa.com> wrote:

> Tuomo just committed 8db3582c4cb021ce762c9832a5314d28018f10aa:
> 	addr_lookup.c: fix coding style
> 
> These changed indentations of IF statements that were split across
> lines.
> 
> For example:
> @@ -181,7 +181,7 @@ static ssize_t netlink_read_reply(int sock, char
> **pbuf, size_t bufsize, struct nlmsghdr *nlhdr = (struct nlmsghdr
> *)(*pbuf + msglen); 
>  		if (!NLMSG_OK(nlhdr, (size_t)readlen) ||
> -		    nlhdr->nlmsg_type == NLMSG_ERROR)
> +			nlhdr->nlmsg_type == NLMSG_ERROR)
>  			return -1;
>  
>  		/* Move read pointer */

We have agreed on Linux coding style. I just noticed there was
spaces instead of tabs and fixed those to follow coding style. None of
us will ever like all parts of any coding style. We need to use the
style we have agreed on or we end up to same mess we had before
agreement.

-- 
Tuomo Soini <tis at foobar.fi>
Foobar Linux services
+358 40 5240030
Foobar Oy <https://foobar.fi/>


More information about the Swan-dev mailing list