OVS practice has evolved over time to mix code and data more freely. See also: https://mail.openvswitch.org/pipermail/ovs-dev/2017-November/341032.html
Signed-off-by: Ben Pfaff <[email protected]> --- Documentation/internals/contributing/coding-style.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Documentation/internals/contributing/coding-style.rst b/Documentation/internals/contributing/coding-style.rst index bcc169af305b..e7992e2be8fa 100644 --- a/Documentation/internals/contributing/coding-style.rst +++ b/Documentation/internals/contributing/coding-style.rst @@ -627,9 +627,8 @@ Most C99 features are OK because they are widely implemented: - Designated initializers (e.g. ``struct foo foo = {.a = 1};`` and ``int a[] = {[2] = 5};``). -- Mixing of declarations and code within a block. Please use this - judiciously; keep declarations nicely grouped together in the - beginning of a block if possible. +- Mixing of declarations and code within a block. Favor positioning that + allows variables to be initialized at their point of declaration. - Use of declarations in iteration statements (e.g. ``for (int i = 0; i < 10; i++)``). -- 2.10.2 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
