Skip to content
Snippets Groups Projects
Commit da522bd1 authored by Ondřej Surý's avatar Ondřej Surý
Browse files

rewrite the ugly fscanf() code to use strtoul()

parent 5a8e7938
No related branches found
No related tags found
No related merge requests found
......@@ -766,7 +766,8 @@ int knot_zload_open(zloader_t **dst, const char *filename)
unsigned long crc_calculated = calculate_crc(f);
/* Read CRC from filename.crc file */
char *crc_path = malloc(sizeof(char) * (strlen(filename) + 4 /* strlen(".crc") */ + 1));
char *crc_path =
malloc(sizeof(char) * (strlen(filename) + 4 /* strlen(".crc") */ + 1));
if (unlikely(!crc_path)) {
fclose(f);
return KNOT_ENOMEM;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment