mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 13:11:28 +00:00
Eliminate unnecessary repeated lookups
This commit is contained in:
@@ -100,11 +100,11 @@ IPP = {
|
|||||||
until( name_len ~= 0 )
|
until( name_len ~= 0 )
|
||||||
|
|
||||||
-- do minimal decoding
|
-- do minimal decoding
|
||||||
for i=1, #attrib.value do
|
for _, av in ipairs(attrib.value) do
|
||||||
if ( attrib.value[i].tag == IPP.Attribute.IPP_TAG_INTEGER ) then
|
if av.tag == IPP.Attribute.IPP_TAG_INTEGER then
|
||||||
attrib.value[i].val = string.unpack(">I4", attrib.value[i].val)
|
av.val = string.unpack(">I4", av.val)
|
||||||
elseif ( attrib.value[i].tag == IPP.Attribute.IPP_TAG_ENUM ) then
|
elseif av.tag == IPP.Attribute.IPP_TAG_ENUM then
|
||||||
attrib.value[i].val = string.unpack(">I4", attrib.value[i].val)
|
av.val = string.unpack(">I4", av.val)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user