[libvirt] [PATCH 01/14] nwfilter: remove pointless virNWFilterHashTable struct

Jiri Denemark jdenemar at redhat.com
Mon Apr 30 13:14:09 UTC 2018


On Fri, Apr 27, 2018 at 16:25:00 +0100, Daniel P. Berrangé wrote:
> The virNWFilterHashTable struct only contains a single virHashTable
> member since
> 
>   commit 293d4fe2f11db98c91175525056c8883725d4b22
>   Author: Daniel P. Berrange <berrange at redhat.com>
>   Date:   Mon Mar 24 16:35:23 2014 +0000
> 
>     Remove pointless storage of var names in virNWFilterHashTable
> 
> Thus, this struct wrapper adds no real value over just using the
> virHashTable directly, but brings the complexity of needing to derefence
> the hashtable to call virHash* APIs, and adds extra memory allocation
> step.
> 
> To minimize code churn this just turns virNWFilterHashTable into a
> typedef aliases virHashTable.
> 
> Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
> ---
>  src/conf/nwfilter_ipaddrmap.c          |  6 ++---
>  src/conf/nwfilter_params.c             | 49 +++++++++++-----------------------
>  src/conf/nwfilter_params.h             |  8 ++----
>  src/nwfilter/nwfilter_dhcpsnoop.c      |  4 +--
>  src/nwfilter/nwfilter_gentech_driver.c | 14 +++++-----
>  tests/nwfilterxml2firewalltest.c       |  2 +-
>  6 files changed, 31 insertions(+), 52 deletions(-)

Reviewed-by: Jiri Denemark <jdenemar at redhat.com>




More information about the libvir-list mailing list