Use the length operator (#) instead of table.getn.

table.getn was deprecated in Lua 5.1 in favor of #, the length operator.
See: http://www.lua.org/manual/5.1/manual.html#7.2
This commit is contained in:
Gerardo Marset 2013-02-25 20:28:28 -02:00
parent d548a78e55
commit 56893e9dcd
11 changed files with 19 additions and 19 deletions

View file

@ -3,7 +3,7 @@ local dispatch = require("dispatch")
local handler = dispatch.newhandler()
-- make sure the user knows how to invoke us
if table.getn(arg) < 1 then
if #arg < 1 then
print("Usage")
print(" lua forward.lua <iport:ohost:oport> ...")
os.exit(1)