aboutsummaryrefslogtreecommitdiff
path: root/tests/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/main.c')
-rw-r--r--tests/main.c5
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;