From b507423026a5eceb290ec47e8020662f6b513418 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 19 Oct 2018 21:56:10 +0200 Subject: [PATCH] CODING_STYLE: briefly mention that fgets() should not be used anymore --- docs/CODING_STYLE | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/CODING_STYLE b/docs/CODING_STYLE index 26928d2e2d6..ca6e1cb693f 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. -- 2.47.3