diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-06-22 16:29:07 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-06-22 16:29:07 -0700 |
commit | 5fd4e2f6d106b1f65b69fdd11172d6d53f5dfce6 (patch) | |
tree | bf4018651b5fa687d51a9ea331f2c9b0c0b197b6 /Documentation/CodingGuidelines | |
parent | e0e8a2dfa05d66562688804ec38939d8bb56a8fd (diff) | |
parent | f0b68f0546a44e2bc3a764bd75b3aa4418c01601 (diff) | |
download | git-5fd4e2f6d106b1f65b69fdd11172d6d53f5dfce6.tar.gz |
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
Diffstat (limited to 'Documentation/CodingGuidelines')
-rw-r--r-- | Documentation/CodingGuidelines | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines index 1f3290f173..ad0e1905a5 100644 --- a/Documentation/CodingGuidelines +++ b/Documentation/CodingGuidelines @@ -188,6 +188,10 @@ For shell scripts specifically (not exhaustive): hopefully nobody starts using "local" before they are reimplemented in C ;-) + - Use octal escape sequences (e.g. "\302\242"), not hexadecimal (e.g. + "\xc2\xa2") in printf format strings, since hexadecimal escape + sequences are not portable. + For C programs: |