From: Štěpán Němec Date: Thu, 10 Jun 2021 13:27:43 +0000 (+0200) Subject: docs/CODING_STYLE: fix some typos X-Git-Tag: v249-rc1~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ae11e1220658aa403dcdd1a3c4753de826b6ede;p=thirdparty%2Fsystemd.git docs/CODING_STYLE: fix some typos --- diff --git a/docs/CODING_STYLE.md b/docs/CODING_STYLE.md index 2f9f80f7786..847ec40d818 100644 --- a/docs/CODING_STYLE.md +++ b/docs/CODING_STYLE.md @@ -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