typo: asm_main soruce_file > source_file
This commit is contained in:
@ -10,13 +10,13 @@ i32 asm_main(i32 argc, char *argv[]) {
|
|||||||
log_err("Usage: asm source.a48s dest.bin");
|
log_err("Usage: asm source.a48s dest.bin");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
int soruce_file = open(argv[1], O_RDONLY);
|
int source_file = open(argv[1], O_RDONLY);
|
||||||
if (soruce_file < 0) {
|
if (source_file < 0) {
|
||||||
log_err_errno("Failed to open file `%s`", argv[1]);
|
log_err_errno("Failed to open file `%s`", argv[1]);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
struct stat statres;
|
struct stat statres;
|
||||||
if (fstat(soruce_file, &statres) < 0) {
|
if (fstat(source_file, &statres) < 0) {
|
||||||
log_err_errno("Failed to stat file `%s`", argv[1]);
|
log_err_errno("Failed to stat file `%s`", argv[1]);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -24,6 +24,5 @@ i32 asm_main(i32 argc, char *argv[]) {
|
|||||||
log_err("Cannot assemble an empty file");
|
log_err("Cannot assemble an empty file");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user