diff options
author | Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> | 2020-12-21 15:17:24 +0100 |
---|---|---|
committer | Nicola Tuveri <nic.tuv@gmail.com> | 2021-01-09 00:20:16 +0200 |
commit | 6d4313f03eddd39ca8d06a5e1d20fc1adcb207c5 (patch) | |
tree | dd124327109474b4317d2bb9a16d6092b3626acb /crypto/des | |
parent | 1330093b9c7e0325ca76589fb9ace5b664830c6d (diff) | |
download | openssl-6d4313f03eddd39ca8d06a5e1d20fc1adcb207c5.tar.gz |
replace 'unsigned const char' with 'const unsigned char'
The openssl code base has only a few occurrences of 'unsigned const char'
(15 occurrences), compared to the more common 'const unsigned char' (4420
occurrences).
While the former is not illegal C, mixing the 'const' keyword (a 'type
qualifier') in between 'unsigned' and 'char' (both 'type specifiers') is a
bit odd.
The background for writing this patch is not to be pedantic, but because
the 'opmock' program (used to mock headers for unit tests) does not accept
the 'unsigned const char' construct. While this definitely is a bug in
opmock or one of its dependencies, openssl is the only piece of software we
are using in combination with opmock that has this construct.
CLA: trivial
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/13722)
Diffstat (limited to 'crypto/des')
-rw-r--r-- | crypto/des/fcrypt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/des/fcrypt.c b/crypto/des/fcrypt.c index 0b181fda3b..190a44dbdf 100644 --- a/crypto/des/fcrypt.c +++ b/crypto/des/fcrypt.c @@ -31,7 +31,7 @@ * Added more values to handle illegal salt values the way normal crypt() * implementations do. */ -static unsigned const char con_salt[128] = { +static const unsigned char con_salt[128] = { 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF, 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, @@ -50,7 +50,7 @@ static unsigned const char con_salt[128] = { 0x3D, 0x3E, 0x3F, 0x40, 0x41, 0x42, 0x43, 0x44, }; -static unsigned const char cov_2char[64] = { +static const unsigned char cov_2char[64] = { 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, |