1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 22:21:29 +00:00

Remove useless bin.pack('A') calls (equivalent to tostring)

This commit is contained in:
dmiller
2017-03-14 02:51:06 +00:00
parent 32b1d1711e
commit edfc5e3835
5 changed files with 19 additions and 19 deletions

View File

@@ -3100,7 +3100,7 @@ Util =
end,
marshall_opaque = function(data)
return bin.pack(">A", data) .. string.rep("\0", Util.CalcFillBytes(data:len()))
return data .. string.rep("\0", Util.CalcFillBytes(data:len()))
end,
unmarshall_opaque = function(len, data, pos)
@@ -3110,7 +3110,7 @@ Util =
marshall_vopaque = function(data)
local l = data:len()
return (
Util.marshall_uint32(l) .. bin.pack(">A", data) ..
Util.marshall_uint32(l) .. data ..
string.rep("\0", Util.CalcFillBytes(l))
)
end,