]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - docs/CODING_STYLE.md
tree-wide: use "hostname" spelling everywhere
[thirdparty/systemd.git] / docs / CODING_STYLE.md
index 517bd2b41ddf6cd5aebbac1ed7a8ae59a22e5fca..12a0c993fc99f37eb224458983d4adc48a25f078 100644 (file)
@@ -1,5 +1,7 @@
 ---
 title: Coding Style
+category: Contributing
+layout: default
 ---
 
 # Coding Style
@@ -206,7 +208,7 @@ title: Coding Style
   numeric. Specifically, if you have an `int b` and it's only used in a boolean
   sense, by all means check its state with `if (b) …` — but if `b` can actually
   have more than two semantic values, and you want to compare for non-zero,
-  then please write that explicity with `if (b != 0) …`. This helps readability
+  then please write that explicitly with `if (b != 0) …`. This helps readability
   as the value range and semantical behaviour is directly clear from the
   condition check. As a special addition: when dealing with pointers which you
   want to check for non-NULL-ness, you may also use downgrade-to-bool feature.
@@ -236,7 +238,7 @@ title: Coding Style
   p = foobar_unref(p);
   ```
 
-  which will always work regardless if `p` is initialized or not,x and
+  which will always work regardless if `p` is initialized or not, and
   guarantees that `p` is `NULL` afterwards, all in just one line.
 
 ## Error Handling
@@ -422,7 +424,7 @@ title: Coding Style
 
 ## Deadlocks
 
-- Do not issue NSS requests (that includes user name and host name lookups)
+- Do not issue NSS requests (that includes user name and hostname lookups)
   from PID 1 as this might trigger deadlocks when those lookups involve
   synchronously talking to services that we would need to start up.
 
@@ -541,7 +543,7 @@ title: Coding Style
   time you need that please immediately undefine `basename()`, and add a
   comment about it, so that no code ever ends up using the POSIX version!
 
-# Committing to git
+## Committing to git
 
 - Commit message subject lines should be prefixed with an appropriate component
   name of some kind. For example "journal: ", "nspawn: " and so on.