From: Marko Kovacevic Date: Mon, 17 Sep 2018 15:24:29 +0000 (+0100) Subject: doc: add note about bool into coding style X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=904ffb2e96f502979da94d9fdcd3cadcd67af464;p=dpdk.git doc: add note about bool into coding style Added a note into the coding style to highlight the use of a bool within a struct Signed-off-by: Marko Kovacevic Reviewed-by: Ferruh Yigit --- diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst index 19445c113a..d96698a739 100644 --- a/doc/guides/contributing/coding_style.rst +++ b/doc/guides/contributing/coding_style.rst @@ -247,6 +247,15 @@ Structure Declarations * Use of the structures should be by separate variable declarations and those declarations must be extern if they are declared in a header file. * Externally visible structure definitions should have the structure name prefixed by ``rte_`` to avoid namespace collisions. +.. note:: + + Uses of ``bool`` in structures are not preferred as is wastes space and + it's also not clear as to what type size the bool is. A preferred use of + ``bool`` is mainly as a return type from functions that return true/false, + and maybe local variable functions. + + Ref: `LKML `_ + Queues ~~~~~~