1
0
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:
dmiller
2014-02-13 15:47:41 +00:00
parent b73c3aa60f
commit a084340b6d
27 changed files with 440 additions and 430 deletions

View File

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