mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-10 16:06:09 +00:00
Merge pull request #3037 from bluca/tweetnacl_pedantic
Problem: C++ style comments in C file breaks pedantic build
This commit is contained in:
commit
efc9efc42f
@ -46,7 +46,7 @@
|
|||||||
#pragma warning(disable : 4018 4244 4146)
|
#pragma warning(disable : 4018 4244 4146)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// clang-format off
|
/* clang-format off */
|
||||||
|
|
||||||
#include "tweetnacl.h"
|
#include "tweetnacl.h"
|
||||||
|
|
||||||
@ -926,8 +926,8 @@ void randombytes (unsigned char *x,unsigned long long xlen)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
#ifndef ZMQ_HAVE_GETRANDOM
|
#ifndef ZMQ_HAVE_GETRANDOM
|
||||||
// Require that random_open has already been called, to avoid
|
/* Require that random_open has already been called, to avoid
|
||||||
// race conditions.
|
race conditions. */
|
||||||
assert (fd != -1);
|
assert (fd != -1);
|
||||||
#endif
|
#endif
|
||||||
while (xlen > 0) {
|
while (xlen > 0) {
|
||||||
@ -950,7 +950,7 @@ void randombytes (unsigned char *x,unsigned long long xlen)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not call manually! Use random_close from random.hpp
|
/* Do not call manually! Use random_close from random.hpp */
|
||||||
int randombytes_close (void)
|
int randombytes_close (void)
|
||||||
{
|
{
|
||||||
int rc = -1;
|
int rc = -1;
|
||||||
@ -959,11 +959,11 @@ int randombytes_close (void)
|
|||||||
fd = -1;
|
fd = -1;
|
||||||
rc = 0;
|
rc = 0;
|
||||||
}
|
}
|
||||||
#endif // ZMQ_HAVE_GETRANDOM
|
#endif /* ZMQ_HAVE_GETRANDOM */
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not call manually! Use random_open from random.hpp
|
/* Do not call manually! Use random_open from random.hpp */
|
||||||
int sodium_init (void)
|
int sodium_init (void)
|
||||||
{
|
{
|
||||||
#ifndef ZMQ_HAVE_GETRANDOM
|
#ifndef ZMQ_HAVE_GETRANDOM
|
||||||
@ -983,11 +983,11 @@ int sodium_init (void)
|
|||||||
assert (rc != -1);
|
assert (rc != -1);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif // ZMQ_HAVE_GETRANDOM
|
#endif /* ZMQ_HAVE_GETRANDOM */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
// clang-format on
|
/* clang-format on */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user