1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-24 08:29:04 +00:00

String concat cleanup grab-bag

Mostly just eliminating concatenation-reassignments by chaining
concatenations, reordering assignments to allow better use of bin.pack,
and using tables to store intermediate results before concatenating
them. Used strbuf as a quick fix in dhcp.lua. Eliminated some unused
string variables in vulns.lua.
This commit is contained in:
dmiller
2015-03-02 14:39:29 +00:00
parent c1b2429efd
commit 03110e7e89
13 changed files with 57 additions and 82 deletions

View File

@@ -722,8 +722,9 @@ Packet.SQ_INFO =
end
end
data = bin.pack(">SSSSS", Constants.Message.SQ_INFO, 0x0006, #params + 6, 0x000c, 0x0004 )
data = data .. params .. bin.pack(">SSS", 0x0000, 0x0000, Constants.Message.SQ_EOT)
data = bin.pack(">SSSSSASSS", Constants.Message.SQ_INFO, 0x0006,
#params + 6, 0x000c, 0x0004, params, 0x0000, 0x0000,
Constants.Message.SQ_EOT)
return data
end
}