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