mirror of
https://github.com/nmap/nmap.git
synced 2026-10-21 11:22:05 +00:00
Use better construction for iterating lines.
This commit is contained in:
parent
bfa052c2f3
commit
86993d74d5
1 changed files with 1 additions and 3 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue