1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

docs: coding-style: One variable declaration per line

This was not mentioned before.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Tim Wiederhake 2022-01-13 17:53:25 +01:00
parent 95c380d410
commit 6c68f120a5

View File

@ -600,6 +600,19 @@ calling another function.
...
}
Prefer variable definitions on separate lines. This allows for smaller,
easier to understand diffs when changing them. Define variables in the
smallest possible scope.
::
GOOD:
int count = 0;
int nnodes;
BAD:
int count = 0, nnodes;
Attribute annotations
---------------------