style: Specify the possibility of "pragma once" usage

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Snir Sheriber <ssheribe@redhat.com>
This commit is contained in:
Frediano Ziglio 2019-08-11 14:16:16 +01:00
parent 2f6e2a8ef9
commit 2379fcd6a5

View File

@ -372,6 +372,15 @@ The macro may include additional information, e.g. a component. For example a fi
Historically, some headers added underscores liberally, e.g. MY_MODULE_H_. This is neither necessary nor discouraged, although as a reminder, a leading underscore followed by a capital letter is reserved for the implementation and should not be used, so _MY_MODULE_H is, technically speaking, invalid C.
Alternatively (recommended on newer code) you can use the `pragma once` directive, as:
[source,c]
----
#pragma once
...
----
Header inclusion
----------------