[Swan-dev] readable C style for split control statements
Andrew Cagney
andrew.cagney at gmail.com
Mon Oct 1 14:08:52 UTC 2018
On Sun, 30 Sep 2018 at 15:52, 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 */
>
>
> This absolutely brings these statements into conformity with
> <https://github.com/torvalds/linux/blob/master/Documentation/process/coding-style.rst>
I couldn't find anything specific? And when I cut/pasted the
suggested lisp into my .emacsrc, it hung the second line off the paren
the way you (and I) prefer.
More information about the Swan-dev
mailing list