[refactor] Initialize variables to default values in multiple files

This commit is contained in:
2025-08-01 15:34:36 +01:00
parent 81633e4445
commit 788c7a2bc7
18 changed files with 120 additions and 115 deletions

View File

@@ -25,15 +25,14 @@
char *byte_array_to_hex_string(const unsigned char *array, int array_size)
{
char *hex_string = NULL;
int j;
int i;
int j = 0;
hex_string = malloc(array_size * 2 + 1);
if(hex_string == NULL) return NULL;
j = 0;
for(i = 0; i < array_size; i++)
for (int i = 0; i < array_size; i++)
{
hex_string[j] = (array[i] >> 4) + '0';
if(hex_string[j] > '9') hex_string[j] += 0x7;