Skip to content

Commit

Permalink
Use a const
Browse files Browse the repository at this point in the history
  • Loading branch information
xyproto committed Feb 9, 2024
1 parent fce2e55 commit 3f0f403
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ int hex_cinclude(const bool colsgiven, int cols, int octspergrp, const bool reve
fputs_or_die("[] = {\n");
}
getc_or_die(&c);
char* hex_format_string = uppercase_hex ? "%s0X%02X" : "%s0x%02x";
const char* hex_format_string = uppercase_hex ? "%s0X%02X" : "%s0x%02x";
while ((length < 0 || p < length) && c != EOF) {
if (fprintf(output_file, hex_format_string, (p % cols) ? ", " : (!p ? " " : ",\n "), c) < 0) {
exit_with_error(3, NULL);
Expand Down

0 comments on commit 3f0f403

Please sign in to comment.