summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>2020-01-06 02:38:14 +0100
committerDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>2020-01-07 16:28:37 +0100
commit9484b67dfb0fc69326b4d94c2040751b205baa24 (patch)
tree4faf73e1aa7d35bdf142c18eb5407758a31c7f45 /doc
parentMove random-related defines to "crypto/rand.h" (diff)
downloadopenssl-9484b67dfb0fc69326b4d94c2040751b205baa24.tar.xz
openssl-9484b67dfb0fc69326b4d94c2040751b205baa24.zip
Modify the add_seeds_stringlist() macro to fix a preprocessor error
When OpenSSL is configured using `--with-rand-seed=devrandom`, the preprocessor reports the following error crypto/info.c:104:66: error: macro "add_seeds_stringlist" passed 3 arguments, but takes just 2 add_seeds_stringlist("random-device", { DEVRANDOM, NULL }); The reason why the preprocessor complains about three arguments being passed is that according to [1], balanced braces in macro arguments don't prevent the comma from acting as an argument separator: 3.3 Macro Arguments ... Parentheses within each argument must balance; a comma within such parentheses does not end the argument. However, there is no requirement for square brackets or braces to balance, and they do not prevent a comma from separating arguments. Also introduced an iteration pointer `p`, because `dev` is not an lvalue: crypto/info.c:78:41: error: lvalue required as increment operand for (; *dev != NULL; dev++) { [1] https://gcc.gnu.org/onlinedocs/cpp/Macro-Arguments.html Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/10762)
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions