Skip to content

Commit 06c0f03

Browse files
committed
Add a note regarding use of #if for config.h processing.
1 parent c6a7849 commit 06c0f03

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ Cryptsetup uses [Linux kernel coding style](https://www.kernel.org/doc/html/late
127127
- Use an elaborative description in the patch header.
128128
- No need to use sign-off-by lines.
129129
- Use name prefixes (``crypt_``, ``LUKS2_`` and similar).
130-
- Avoid extensive preprocessor use (specifically ``#ifdef`` sections).
130+
- Avoid extensive preprocessor use (specifically conditional ``#if`` or ``#ifdef`` sections).
131+
- To check detected configuration options stored in config.h, always use ``#if SOMETHING`` (do NOT use ``#ifdef``).
131132
- Use output only through ``log_err, log_std, log_verbose, log_dbg`` macros.
132133
The ``log_dbg`` is always in English; the others should be wrapped in the ``_()`` macro for translation.
133134
- Use ``assert()`` but only for simple invariants and variables (avoid calling functions).

0 commit comments

Comments
 (0)