summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-10-19 21:56:10 +0200
committerLennart Poettering <lennart@poettering.net>2018-10-26 10:52:41 +0200
commitb507423026a5eceb290ec47e8020662f6b513418 (patch)
treec26b45a992c95dcf69e3b5211485be0270e0757e /docs
parentfileio: drop FOREACH_LINE(), it's not used anymore (diff)
downloadsystemd-b507423026a5eceb290ec47e8020662f6b513418.tar.xz
systemd-b507423026a5eceb290ec47e8020662f6b513418.zip
CODING_STYLE: briefly mention that fgets() should not be used anymore
Diffstat (limited to 'docs')
-rw-r--r--docs/CODING_STYLE4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/CODING_STYLE b/docs/CODING_STYLE
index 26928d2e2d..ca6e1cb693 100644
--- a/docs/CODING_STYLE
+++ b/docs/CODING_STYLE
@@ -458,3 +458,7 @@
- When referring to a file system path that is a directory, please always
suffix it with "/", to indicate that it is a directory, not a regular file
(or other file system object).
+
+- Don't use fgets(), it's too hard to properly handle errors such as overly
+ long lines. Use read_line() instead, which is our own function that handles
+ this much nicer.