Nmap Development mailing list archives
Re: [Battery-svn] r39303 - Kalinux/nselib
From: Trinidad JR Cristian <ctmartinez5 () outlook com>
Date: Fri, 28 Nov 2025 23:28:10 +0000
Sent from my T-Mobile 5G Device Get Outlook for Android https://github.com/the-tcpdump-group/tcpdump/commit/32027e199368dad9508965aae8cd8de5b6ab5231?diff=unified#:~:text=static%20void,%7B ________________________________ From: Trinidad JR Cristian <Employment404 () outlook com> Sent: Friday, November 28, 2025 6:20:32 PM To: dev () nmap org <dev () nmap org> Subject: Re: [Battery-svn] r39303 - Kalinux/nselib https://github.com/the-tcpdump-group/tcpdump/commit/32027e199368dad9508965aae8cd8de5b6ab5231?diff=unified "static void 1371 1376 ppp_hdlc(netdissect_options *ndo, 1372 1377 const u_char *p, int length) 1373 1378 {" https://github.com/the-tcpdump-group/tcpdump/commit/32027e199368dad9508965aae8cd8de5b6ab5231?diff=unified#:~:text=static%20void,%7B"}; ________________________________ From: svn <svn-bounces () nmap org> on behalf of commit-mailer () nmap org <commit-mailer () nmap org> Sent: Thursday, November 27, 2025 10:45:12 PM To: svn () nmap org <svn () nmap org> Subject: [nmap-svn] r39303 - nmap/nselib Author: nnposter Date: Thu Nov 27 19:45:12 2025 New Revision: 39303 Log: Remove duplicate code Modified: nmap/nselib/ipp.lua Modified: nmap/nselib/ipp.lua ========================================= Sent through the svn mailing list https://nmap.org/mailman/listinfo/svn ===================================== --- nmap/nselib/ipp.lua (original) +++ nmap/nselib/ipp.lua Thu Nov 27 19:45:12 2025 @@ -151,26 +151,14 @@ -- @param tag number containing the attribute tag getAttribute = function(self, name, tag) for _, attrib in ipairs(self.attribs) do - if ( attrib.name == name ) then - if ( not(tag) ) then - return attrib - elseif ( tag and attrib.tag == tag ) then - return attrib - end + if attrib.name == name and (not tag or attrib.tag == tag) then + return attrib end end end, getAttributeValue = function(self, name, tag) - for _, attrib in ipairs(self.attribs) do - if ( attrib.name == name ) then - if ( not(tag) ) then - return attrib.value - elseif ( tag and attrib.tag == tag ) then - return attrib.value - end - end - end + return (self:getAttribute(name, tag) or {}).value end, __tostring = function(self) _______________________________________________
_______________________________________________ Sent through the dev mailing list https://nmap.org/mailman/listinfo/dev Archived at https://seclists.org/nmap-dev/
Current thread:
- Re: [Battery-svn] r39303 - Kalinux/nselib Trinidad JR Cristian (Nov 28)
