From: Lennart Poettering Date: Fri, 19 Oct 2018 19:56:10 +0000 (+0200) Subject: CODING_STYLE: briefly mention that fgets() should not be used anymore X-Git-Tag: v240~466^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F10519%2Fhead;p=thirdparty%2Fsystemd.git CODING_STYLE: briefly mention that fgets() should not be used anymore --- 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.