Skip to content

Commit fc696d5

Browse files
kocielnikkeszybz
authored andcommitted
Docs: Fix spelling and capitalization (systemd#7408)
1 parent 37ac274 commit fc696d5

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.github/CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ If you discover a security vulnerability, we'd appreciate a non-public disclosur
2828
* Please make sure to test your change before submitting the PR. See [HACKING](https://raw.githubusercontent.com/systemd/systemd/master/HACKING) for details how to do this.
2929
* Make sure to run the test suite locally, before posting your PR. We use a CI system, meaning we don't even look at your PR, if the build and tests don't pass.
3030
* If you need to update the code in an existing PR, force-push into the same branch, overriding old commits with new versions.
31-
* After you have pushed a new version, add a comment about the new version (no notification is sent just for the commits, so it's easy to miss the update without an explicit comment). If you are a member of the systemd project on github, remove the `reviewed/needs-rework` label.
31+
* After you have pushed a new version, add a comment about the new version (no notification is sent just for the commits, so it's easy to miss the update without an explicit comment). If you are a member of the systemd project on GitHub, remove the `reviewed/needs-rework` label.
3232

3333
## Final Words
3434

CODING_STYLE

+5-5
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@
218218
- We never use the POSIX version of basename() (which glibc defines it in
219219
libgen.h), only the GNU version (which glibc defines in string.h).
220220
The only reason to include libgen.h is because dirname()
221-
is needed. Everytime you need that please immediately undefine
221+
is needed. Every time you need that please immediately undefine
222222
basename(), and add a comment about it, so that no code ever ends up
223223
using the POSIX version!
224224

@@ -363,7 +363,7 @@
363363
global variables. Why are global variables bad? They usually hinder
364364
generic reusability of code (since they break in threaded programs,
365365
and usually would require locking there), and as the code using them
366-
has side-effects make programs intransparent. That said, there are
366+
has side-effects make programs non-transparent. That said, there are
367367
many cases where they explicitly make a lot of sense, and are OK to
368368
use. For example, the log level and target in log.c is stored in a
369369
global variable, and that's OK and probably expected by most. Also
@@ -385,7 +385,7 @@
385385

386386
- When exposing public C APIs, be careful what function parameters you make
387387
"const". For example, a parameter taking a context object should probably not
388-
be "const", even if you are writing an other-wise read-only accessor function
388+
be "const", even if you are writing an otherwise read-only accessor function
389389
for it. The reason is that making it "const" fixates the contract that your
390390
call won't alter the object ever, as part of the API. However, that's often
391391
quite a promise, given that this even prohibits object-internal caching or
@@ -395,14 +395,14 @@
395395

396396
- Make sure to enforce limits on every user controllable resource. If the user
397397
can allocate resources in your code, your code must enforce some form of
398-
limits after which it will refuse operation. It's fine if it is hardcoded (at
398+
limits after which it will refuse operation. It's fine if it is hard-coded (at
399399
least initially), but it needs to be there. This is particularly important
400400
for objects that unprivileged users may allocate, but also matters for
401401
everything else any user may allocated.
402402

403403
- htonl()/ntohl() and htons()/ntohs() are weird. Please use htobe32() and
404404
htobe16() instead, it's much more descriptive, and actually says what really
405-
is happening, after all htonl() and htons() don't operation on longs and
405+
is happening, after all htonl() and htons() don't operate on longs and
406406
shorts as their name would suggest, but on uint32_t and uint16_t. Also,
407407
"network byte order" is just a weird name for "big endian", hence we might
408408
want to call it "big endian" right-away.

0 commit comments

Comments
 (0)