Fix clang-format lint warnings

This commit is contained in:
Gustavo Garcia 2024-04-19 17:08:49 +02:00
parent 28294cf053
commit c2d13700ac
3 changed files with 8 additions and 6 deletions

View File

@ -1778,10 +1778,11 @@ unsigned char *base64decode(const void *b64_decode_this, int decode_this_many_by
int decoded_byte_index = 0; // Index where the next base64_decoded byte should be written.
while (0 < BIO_read(b64_bio, base64_decoded + decoded_byte_index, 1)) { // Read byte-by-byte.
decoded_byte_index++; // Increment the index until read of BIO decoded data is complete.
} // Once we're done reading decoded data, BIO_read returns -1 even though there's no error.
BIO_free_all(b64_bio); // Destroys all BIOs in chain, starting with b64 (i.e. the 1st one).
return base64_decoded; // Returns base-64 decoded data with trailing null terminator.
} // Once we're done reading decoded data, BIO_read returns -1 even though there's no error.
BIO_free_all(b64_bio); // Destroys all BIOs in chain, starting with b64 (i.e. the 1st one).
return base64_decoded; // Returns base-64 decoded data with trailing null terminator.
}
int decodedTextSize(char *input) {
int i = 0;
int result = 0, padding = 0;
@ -1794,8 +1795,8 @@ int decodedTextSize(char *input) {
result = (strlen(input) / 4 * 3) - padding;
return result;
}
void decrypt_aes_128(char *in, const unsigned char *mykey) {
void decrypt_aes_128(char *in, const unsigned char *mykey) {
unsigned char iv[8] = {0};
AES_KEY key;
unsigned char outdata[256];

View File

@ -28,7 +28,7 @@
* SUCH DAMAGE.
*/
#if !defined(__MAIN_RELAY__)
#ifndef __MAIN_RELAY__
#define __MAIN_RELAY__
#include <limits.h>

View File

@ -4792,8 +4792,9 @@ static void peer_input_handler(ioa_socket_handle s, int event_type, ioa_net_data
turn_report_session_usage(ss, 0);
allocation *a = get_allocation_ss(ss);
if (!is_allocation_valid(a))
if (!is_allocation_valid(a)) {
return;
}
uint16_t chnum = 0;