1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-03 01:18:10 +03:00

README.Coding: Add a boolean example we use very often

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Andreas Schneider 2016-02-15 15:51:26 +01:00 committed by Andreas Schneider
parent 19fdc7fd57
commit dae1a9fdb5

View File

@ -312,6 +312,17 @@ lib/replace/, new code should adhere to the following conventions:
* Boolean values are "true" and "false" (not True or False)
* Exact width integers are of type [u]int[8|16|32|64]_t
Most of the time a good name for a boolean variable is 'ok'. Here is an
example we often use:
bool ok;
ok = foo();
if (!ok) {
/* do something */
}
It makes the code more readable and is easy to debug.
Typedefs
--------