diff --git a/src/asm.c b/src/asm.c index 7abe1be..b88fc4a 100644 --- a/src/asm.c +++ b/src/asm.c @@ -10,13 +10,13 @@ i32 asm_main(i32 argc, char *argv[]) { log_err("Usage: asm source.a48s dest.bin"); return 1; } - int soruce_file = open(argv[1], O_RDONLY); - if (soruce_file < 0) { + int source_file = open(argv[1], O_RDONLY); + if (source_file < 0) { log_err_errno("Failed to open file `%s`", argv[1]); return 1; } 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]); return 1; } @@ -24,6 +24,5 @@ i32 asm_main(i32 argc, char *argv[]) { log_err("Cannot assemble an empty file"); return 1; } - return 0; }