CODING_STYLE: document intended usage of types

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: George Dunlap <george.dunlap@citrix.com>
This commit is contained in:
Jan Beulich committed 2019-08-07 12:08:38 +02:00
1 parent ef04aa69f0
commit 6954c93e08
1 file changed
+13
+13
View File
@@ -88,6 +88,19 @@ Braces should be omitted for blocks with a single statement. e.g.,
if ( condition )
single_statement();
Types
-----
Use basic C types and C standard mandated typedef-s where possible (and
with preference in this order). This in particular means to avoid u8,
u16, etc despite those types continuing to exist in our code base.
Fixed width types should only be used when a fixed width quantity is
meant (which for example may be a value read from or to be written to a
register).
Especially with pointer types, whenever the pointed to object is not
(supposed to be) modified, qualify the pointed to type with "const".
Comments
--------
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.