From: Lennart Poettering Date: Tue, 21 Nov 2017 16:58:51 +0000 (+0100) Subject: CODING_STYLE: document the order in which unescaping + specifier expansion should... X-Git-Tag: v236~94^2~28 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=35838def32a9ab13a12aa886b847b5a0d6056899;p=thirdparty%2Fsystemd.git CODING_STYLE: document the order in which unescaping + specifier expansion should be done --- diff --git a/CODING_STYLE b/CODING_STYLE index 9dcc09030cf..b090db370f0 100644 --- a/CODING_STYLE +++ b/CODING_STYLE @@ -434,3 +434,8 @@ that interrupted system calls are automatically restarted, and we minimize hassles with handling EINTR (in particular as EINTR handling is pretty broken on Linux). + +- When applying C-style unescaping as well as specifier expansion on the same + string, always apply the C-style unescaping fist, followed by the specifier + expansion. When doing the reverse, make sure to escape '%' in specifier-style + first (i.e. '%' → '%%'), and then do C-style escaping where necessary.