Skip to content

Commit

Permalink
Fix format string for size_t variables
Browse files Browse the repository at this point in the history
  • Loading branch information
ziemleszcz authored and gotthardp committed Jul 11, 2021
1 parent b412cc7 commit 1719114
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/configuration.c
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ void scep_dump_conf() {
printf("Option: %s, Flag: %i, Value: %s\n", names[i], flags[i], chars[i]);
}
} else {
fprintf(stderr, "Length of Arrays does not match! Flags: %li, Chars: %li, Names: %li\n",
fprintf(stderr, "Length of Arrays does not match! Flags: %zu, Chars: %zu, Names: %zu\n",
sizeof(flags)/sizeof(int),
sizeof(chars)/sizeof(char *),
sizeof(names)/sizeof(char *)
Expand Down
2 changes: 1 addition & 1 deletion src/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ send_msg(struct http_reply *http, int do_post, char *scep_operation,

if (do_post) {
rlen += snprintf(http_string+rlen, sizeof(http_string)-rlen,
"Content-Length: %zd\r\n", payload_len);
"Content-Length: %zu\r\n", payload_len);
exit_string_overflow(sizeof(http_string) <= rlen);
}

Expand Down

0 comments on commit 1719114

Please sign in to comment.