diff options
author | Ben Pfaff <blp@ovn.org> | 2017-11-28 16:42:54 -0800 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2017-12-22 14:07:02 -0800 |
commit | 09de8591d28ef596e1c62cf0b6a2d6e6a8988e1e (patch) | |
tree | 38776889264d20224d23c7432474bb6f4d797511 /Documentation/internals | |
parent | b2befd5bb2db811ac0273bc52be158d3476a5ff7 (diff) | |
download | openvswitch-09de8591d28ef596e1c62cf0b6a2d6e6a8988e1e.tar.gz |
coding-style: Remove caveats about mixing statements and declarations.
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>
Acked-by: Justin Pettit <jpettit@ovn.org>
Diffstat (limited to 'Documentation/internals')
-rw-r--r-- | Documentation/internals/contributing/coding-style.rst | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Documentation/internals/contributing/coding-style.rst b/Documentation/internals/contributing/coding-style.rst index 63a36812a..3ce104994 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++)``). |