mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-23 20:15:19 -07:00
Format multi-line comments consistently
This commit is contained in:
parent
e7e378fad1
commit
f3b0e32d64
@ -27,13 +27,14 @@ crypto_secretbox_detached(unsigned char *c, unsigned char *mac,
|
||||
|
||||
crypto_core_hsalsa20(subkey, n, k, NULL);
|
||||
|
||||
/* Allow the m and and c buffer to partially overlap, by calling
|
||||
memmove() if necessary.
|
||||
|
||||
Note that there is no fully portable way to compare pointers.
|
||||
Some tools even report undefined behavior, despite the conversion.
|
||||
Nevertheless, this works on all supported platforms.
|
||||
*/
|
||||
/*
|
||||
* Allow the m and and c buffer to partially overlap, by calling
|
||||
* memmove() if necessary.
|
||||
*
|
||||
* Note that there is no fully portable way to compare pointers.
|
||||
* Some tools even report undefined behavior, despite the conversion.
|
||||
* Nevertheless, this works on all supported platforms.
|
||||
*/
|
||||
if (((uintptr_t) c > (uintptr_t) m &&
|
||||
(uintptr_t) c - (uintptr_t) m < mlen) ||
|
||||
((uintptr_t) m > (uintptr_t) c &&
|
||||
@ -108,13 +109,14 @@ crypto_secretbox_open_detached(unsigned char *m, const unsigned char *c,
|
||||
if (m == NULL) {
|
||||
return 0;
|
||||
}
|
||||
/* Allow the m and and c buffer to partially overlap, by calling
|
||||
memmove() if necessary.
|
||||
|
||||
Note that there is no fully portable way to compare pointers.
|
||||
Some tools even report undefined behavior, despite the conversion.
|
||||
Nevertheless, this works on all supported platforms.
|
||||
*/
|
||||
/*
|
||||
* Allow the m and and c buffer to partially overlap, by calling
|
||||
* memmove() if necessary.
|
||||
*
|
||||
* Note that there is no fully portable way to compare pointers.
|
||||
* Some tools even report undefined behavior, despite the conversion.
|
||||
* Nevertheless, this works on all supported platforms.
|
||||
*/
|
||||
if (((uintptr_t) c > (uintptr_t) m &&
|
||||
(uintptr_t) c - (uintptr_t) m < clen) ||
|
||||
((uintptr_t) m > (uintptr_t) c &&
|
||||
|
@ -31,13 +31,14 @@ crypto_secretbox_xchacha20poly1305_detached(unsigned char *c,
|
||||
|
||||
crypto_core_hchacha20(subkey, n, k, NULL);
|
||||
|
||||
/* Allow the m and and c buffer to partially overlap, by calling
|
||||
memmove() if necessary.
|
||||
|
||||
Note that there is no fully portable way to compare pointers.
|
||||
Some tools even report undefined behavior, despite the conversion.
|
||||
Nevertheless, this works on all supported platforms.
|
||||
*/
|
||||
/*
|
||||
* Allow the m and and c buffer to partially overlap, by calling
|
||||
* memmove() if necessary.
|
||||
*
|
||||
* Note that there is no fully portable way to compare pointers.
|
||||
* Some tools even report undefined behavior, despite the conversion.
|
||||
* Nevertheless, this works on all supported platforms.
|
||||
*/
|
||||
if (((uintptr_t) c > (uintptr_t) m &&
|
||||
(uintptr_t) c - (uintptr_t) m < mlen) ||
|
||||
((uintptr_t) m > (uintptr_t) c &&
|
||||
@ -115,13 +116,14 @@ crypto_secretbox_xchacha20poly1305_open_detached(unsigned char *m,
|
||||
if (m == NULL) {
|
||||
return 0;
|
||||
}
|
||||
/* Allow the m and and c buffer to partially overlap, by calling
|
||||
memmove() if necessary.
|
||||
|
||||
Note that there is no fully portable way to compare pointers.
|
||||
Some tools even report undefined behavior, despite the conversion.
|
||||
Nevertheless, this works on all supported platforms.
|
||||
*/
|
||||
/*
|
||||
* Allow the m and and c buffer to partially overlap, by calling
|
||||
* memmove() if necessary.
|
||||
*
|
||||
* Note that there is no fully portable way to compare pointers.
|
||||
* Some tools even report undefined behavior, despite the conversion.
|
||||
* Nevertheless, this works on all supported platforms.
|
||||
*/
|
||||
if (((uintptr_t) c > (uintptr_t) m &&
|
||||
(uintptr_t) c - (uintptr_t) m < clen) ||
|
||||
((uintptr_t) m > (uintptr_t) c &&
|
||||
|
Loading…
Reference in New Issue
Block a user