[ovs-dev,RFC] coding-style: Remove caveats about mixing statements and declarations.

Message ID 20171129004254.27293-1-blp@ovn.org
State New
Headers show
Series
  • [ovs-dev,RFC] coding-style: Remove caveats about mixing statements and declarations.
Related show

Commit Message

Ben Pfaff Nov. 29, 2017, 12:42 a.m.
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 <blp@ovn.org>
---
 Documentation/internals/contributing/coding-style.rst | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Patch

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++)``).