mirror of
https://github.com/nmap/nmap.git
synced 2025-12-09 06:01:28 +00:00
Use better construction for iterating lines.
This commit is contained in:
@@ -246,9 +246,7 @@ function read_from_file( file )
|
|||||||
end
|
end
|
||||||
|
|
||||||
local line, ret = nil, {}
|
local line, ret = nil, {}
|
||||||
while true do
|
for l in f:lines() do
|
||||||
line = f:read()
|
|
||||||
if not line then break end
|
|
||||||
ret[#ret+1] = line
|
ret[#ret+1] = line
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user