Skip to content

Commit 5fd4e2f

Browse files
committed
Merge branch 'jt/doc-use-octal-with-printf'
Suggest to refrain from using hex literals that are non-portable when writing printf(1) format strings. * jt/doc-use-octal-with-printf: CodingGuidelines: use octal escapes, not hex
2 parents e0e8a2d + f0b68f0 commit 5fd4e2f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Documentation/CodingGuidelines

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,10 @@ For shell scripts specifically (not exhaustive):
188188
hopefully nobody starts using "local" before they are reimplemented
189189
in C ;-)
190190

191+
- Use octal escape sequences (e.g. "\302\242"), not hexadecimal (e.g.
192+
"\xc2\xa2") in printf format strings, since hexadecimal escape
193+
sequences are not portable.
194+
191195

192196
For C programs:
193197

0 commit comments

Comments
 (0)