[CRIU] [PATCH 1/3] remote: Fix code indentation

Pavel Tikhomirov snorcht at gmail.com
Wed Feb 6 18:12:49 MSK 2019


> > Is these hunk really an indentation fix? we have many places of:
> >
> Thank you for asking, this patch is actually fixing the indentation on
> several places, and since
> https://criu.org/How_to_submit_patches#Edit_the_source_code recommends
> to follow Linux kernel coding style
> <https://www.kernel.org/doc/Documentation/process/coding-style.rst>,
> which states a preferred way for placing braces and spaces, and gives
> the following example:
>
>     if (x == y) {
>         ..
>     } else if (x > y) {
>         ...
>     } else {
>         ....
>     }
>
> I though that it would be good to make the code consistent and follow
> this practice. However, I don't have a string opinion about this and I
> will be happy to send a patch to revert these changes.
>
>
Thanks for you explanation!

Now I see that to follow Linux coding style we actually need to fix other
23 places where we partially skip brackets only in a single branch
according to:

"Do not unnecessarily use braces where a single statement will do.
This does not apply if only one branch of a conditional statement is a
single
statement; in the latter case use braces in both branches"
https://www.kernel.org/doc/Documentation/process/coding-style.rst

So these hunk is fine.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20190206/99eea911/attachment-0001.html>


More information about the CRIU mailing list