Cleaned up 2 size_t warnings in char.cpp (#8296)

This commit is contained in:
Lemongrass3110 2024-05-03 08:17:13 +02:00 committed by GitHub
parent 29a3c5263b
commit 38ca0998fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2820,7 +2820,8 @@ void char_set_defaults(){
*/
void char_config_split_startpoint( char* w1_value, char* w2_value, struct s_point_str start_point[MAX_STARTPOINT], short* count ){
char *lineitem, **fields;
int i = 0, fields_length = 3 + 1;
int i = 0;
size_t fields_length = 3 + 1;
(*count) = 0; // Reset to begin reading
@ -2859,7 +2860,8 @@ void char_config_split_startpoint( char* w1_value, char* w2_value, struct s_poin
void char_config_split_startitem(char *w1_value, char *w2_value, struct startitem start_items[MAX_STARTITEM])
{
char *lineitem, **fields;
int i = 0, fields_length = 3 + 1;
int i = 0;
size_t fields_length = 3 + 1;
fields = (char **)aMalloc(fields_length * sizeof(char *));
if (fields == NULL)