aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mkelf.lua9
1 files changed, 5 insertions, 4 deletions
diff --git a/mkelf.lua b/mkelf.lua
index a70317f..cd02626 100644
--- a/mkelf.lua
+++ b/mkelf.lua
@@ -82,16 +82,17 @@ local function loadconfig(fn)
end
local function main()
- local outfn, infn = "a.out", nil
+ local outfn = "a.out"
+ local infn
local i = 1
while arg[i] do
if arg[i] == "-o" then
i = i + 1
outfn = arg[i] or die("missing filename after -o")
- elseif infn then
- usage()
- else
+ elseif infn == nil then
infn = arg[i]
+ else
+ usage()
end
i = i + 1
end