mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
conf: make virNetworkIpDefClear consistent with other functions
The other clear functions in network_conf.c that clear out arrays of sub-objects do so by using the n[itemname]s value as a counter going down to 0. Make this one consistent. There's no functional value, just makes the style more consistent with the rest of the file.
This commit is contained in:
parent
dc9d8d6810
commit
31d21197d3
@ -118,15 +118,14 @@ virNetworkDHCPHostDefClear(virNetworkDHCPHostDefPtr def)
|
||||
VIR_FREE(def->name);
|
||||
}
|
||||
|
||||
static void virNetworkIpDefClear(virNetworkIpDefPtr def)
|
||||
static void
|
||||
virNetworkIpDefClear(virNetworkIpDefPtr def)
|
||||
{
|
||||
int ii;
|
||||
|
||||
VIR_FREE(def->family);
|
||||
VIR_FREE(def->ranges);
|
||||
|
||||
for (ii = 0 ; ii < def->nhosts && def->hosts ; ii++)
|
||||
virNetworkDHCPHostDefClear(&def->hosts[ii]);
|
||||
while (def->nhosts--)
|
||||
virNetworkDHCPHostDefClear(&def->hosts[def->nhosts]);
|
||||
|
||||
VIR_FREE(def->hosts);
|
||||
VIR_FREE(def->tftproot);
|
||||
|
Loading…
x
Reference in New Issue
Block a user