From e32a406032dd984eef05941377c65ca18c702b7f Mon Sep 17 00:00:00 2001 From: david Date: Fri, 26 Feb 2010 20:58:54 +0000 Subject: [PATCH] Fix code style in PortList::freePortMap. --- portlist.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/portlist.cc b/portlist.cc index c542c173f..b6ef8b729 100644 --- a/portlist.cc +++ b/portlist.cc @@ -724,13 +724,14 @@ int PortList::forgetPort(u16 portno, u8 protocol) { /* Just free memory used by PortList::port_map[]. Should be done somewhere * before closing nmap. */ -void PortList::freePortMap(){ +void PortList::freePortMap() { int proto; - for(proto=0; proto < PORTLIST_PROTO_MAX; proto++) { - if(port_map[proto]){ + + for (proto=0; proto < PORTLIST_PROTO_MAX; proto++) { + if (port_map[proto]) { free(port_map[proto]); port_map[proto] = NULL; - } + } if (port_map_rev[proto]) { free(port_map_rev[proto]); port_map_rev[proto] = NULL;