docs/CODING_STYLE: fix some typos

This commit is contained in:
Štěpán Němec 2021-06-10 15:27:43 +02:00 committed by Luca Boccassi
parent 527653f827
commit 6ae11e1220

View file

@ -404,7 +404,7 @@ layout: default
limits after which it will refuse operation. It's fine if it is hard-coded
(at least initially), but it needs to be there. This is particularly
important for objects that unprivileged users may allocate, but also matters
for everything else any user may allocated.
for everything else any user may allocate.
## Types
@ -439,7 +439,7 @@ layout: default
- Use the bool type for booleans, not integers. One exception: in public
headers (i.e those in `src/systemd/sd-*.h`) use integers after all, as `bool`
is C99 and in our public APIs we try to stick to C89 (with a few extension).
is C99 and in our public APIs we try to stick to C89 (with a few extensions).
## Deadlocks
@ -556,7 +556,7 @@ layout: default
process, please use `_exit()` instead of `exit()`, so that the exit handlers
are not run.
- We never use the POSIX version of `basename()` (which glibc defines it in
- We never use the POSIX version of `basename()` (which glibc defines in
`libgen.h`), only the GNU version (which glibc defines in `string.h`). The
only reason to include `libgen.h` is because `dirname()` is needed. Every
time you need that please immediately undefine `basename()`, and add a
@ -565,7 +565,7 @@ layout: default
- Never use `FILENAME_MAX`. Use `PATH_MAX` instead (for checking maximum size
of paths) and `NAME_MAX` (for checking maximum size of filenames).
`FILENAME_MAX` is not POSIX, and is a confusingly named alias for `PATH_MAX`
on Linux. Note the `NAME_MAX` does not include space for a trailing `NUL`,
on Linux. Note that `NAME_MAX` does not include space for a trailing `NUL`,
but `PATH_MAX` does. UNIX FTW!
## Committing to git