[Cocci] convert if (x) stmt to if (x) {stmt}

ron minnich rminnich at gmail.com
Wed May 16 18:21:30 CEST 2018


we've found another one of these
if (x)
y
z

things in firmware that were intended to be
if (x) {
y
z
}

we're kind of tired of this and want to blanket require {} for all ifs,
even one liners.

We want to convert the entire code base such that all if (E) S becomes if
(E) {S} but of course we don't want to add extra {}.

I don't totally trust my rusty spatch-foo to get this right and was
wondering if there's already such a thing out there.

ron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://systeme.lip6.fr/pipermail/cocci/attachments/20180516/8e8c83ca/attachment.html>


More information about the Cocci mailing list