mirror of
https://github.com/nmap/nmap.git
synced 2025-12-23 07:59:03 +00:00
Remove useless calls to string.format
stdnse.print_debug accepts a format string and arguments, making
string.format redundant in calls of this form:
stdnse.print_debug(1, string.format("%s: error", SCRIPT_NAME))
stdnse.print_debug(("length %d"):format(#tab))
These can be rewritten as:
stdnse.print_debug(1, "%s: error", SCRIPT_NAME)
stdnse.print_debug("length %d", #tab)
This commit is contained in:
@@ -558,7 +558,7 @@ function query(socket, data)
|
||||
--Create an error handler
|
||||
local catch = function()
|
||||
socket:close()
|
||||
stdnse.print_debug(string.format("Query failed"))
|
||||
stdnse.print_debug("Query failed")
|
||||
end
|
||||
local try = nmap.new_try(catch)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user