Re: [PATCH 1/1] checkpatch: nested structs

From: Jan Engelhardt
Date: Tue Apr 08 2008 - 13:59:17 EST



On Tuesday 2008-04-08 19:35, Andy Whitcroft wrote:
>> # on the line
>> - if ($line =~ /}(?!(?:,|;|\)))\S/) {
>> + if ($line =~ /}+(?!(?:,|;|\)))\S/) {
>> ERROR("space required after that close brace '}'\n" . $herecurr);
>> }
>
>If my eyes are not lying then you have added is a + after the first },
>as this is an unanchored match I would expect that to match in exactly
>the same places. Hmm, well I guess that it would allow two or more close
>braces to abutt. Can you give me an example of somethign which would
>require this?

+#define E(a, b, c, d) \
+ {.ip6 = { \
+ __constant_htonl(a), __constant_htonl(b), \
+ __constant_htonl(c), __constant_htonl(d), \
+ }}

static const struct union nf_inet_addr some_address = E(20010db8,0,13,17);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/