diff options
author | dec05eba <dec05eba@protonmail.com> | 2023-08-19 13:26:46 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2023-08-19 13:26:46 +0200 |
commit | fab7a00da328debef4fbeba9eb21fc02cf21675d (patch) | |
tree | 6d207b735889dd16412586b173fdef512bdb921e /tests | |
parent | 75b13e6106e5adfa21589dd84f042bf410142288 (diff) |
Diffstat (limited to 'tests')
-rw-r--r-- | tests/main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/main.c b/tests/main.c index 4c9e93c..7ba19f5 100644 --- a/tests/main.c +++ b/tests/main.c @@ -4,6 +4,7 @@ #include <string.h> char* file_get_content(const char *path, long *filesize) { + char *data; FILE *file = fopen(path, "rb"); if(!file) { perror(path); @@ -14,7 +15,7 @@ char* file_get_content(const char *path, long *filesize) { *filesize = ftell(file); fseek(file, 0, SEEK_SET); - char *data = malloc(*filesize); + data = malloc(*filesize); fread(data, 1, *filesize, file); fclose(file); return data; @@ -56,7 +57,7 @@ void html_node_print(HtmlNode *node) { } } -int main() { +int main(void) { int result; HtmlTree html_tree; long filesize; |