* fix finding python path which only has python3. * fix #1246, arm host issue. * skip assembler tests on non-x86 host. * update macro of dummy value. * fix MSVC macro. * update dummy array value macro. * restore to original qemu code.
This commit is contained in:
@@ -42,7 +42,14 @@ do { \
|
||||
char * read_file(const char *filename, struct stat *info) {
|
||||
stat(filename, info);
|
||||
char *code = malloc(info->st_size);
|
||||
if (code == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
FILE *fp = fopen(filename, "r");
|
||||
if (fp == NULL) {
|
||||
free(code);
|
||||
return NULL;
|
||||
}
|
||||
fread(code, info->st_size, 1, fp);
|
||||
return code;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user