1
0
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:
batrick
2010-12-08 14:18:45 +00:00
parent bfa052c2f3
commit 86993d74d5

View File

@@ -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