Skip to content

Commit

Permalink
core/conf: Fix 32-bit builds, make printf-ing of size_t variables…
Browse files Browse the repository at this point in the history
  • Loading branch information
bostjan committed Jul 27, 2023
1 parent 04aeac3 commit e460f56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/configfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ char * snoopy_configfile_getOptionValueAsString_datasource_message_max_length ()

size_t strBufSize = sizeof(CFG->datasource_message_max_length)*8 + 1;
char * strBuf = malloc(strBufSize);
snprintf(strBuf, strBufSize, "%ld", CFG->datasource_message_max_length);
snprintf(strBuf, strBufSize, "%zu", CFG->datasource_message_max_length);
return strBuf;
}

Expand All @@ -666,7 +666,7 @@ char * snoopy_configfile_getOptionValueAsString_log_message_max_length ()

size_t strBufSize = sizeof(CFG->log_message_max_length)*8 + 1;
char * strBuf = malloc(strBufSize);
snprintf(strBuf, strBufSize, "%ld", CFG->log_message_max_length);
snprintf(strBuf, strBufSize, "%zu", CFG->log_message_max_length);
return strBuf;
}

Expand Down

0 comments on commit e460f56

Please sign in to comment.