From f7d32ce260957e32589c0782cfe4175896ce8dc6 Mon Sep 17 00:00:00 2001 From: Stefan Berger Date: Tue, 6 Apr 2010 06:29:00 -0400 Subject: [PATCH] This patch fixes some compilation issues for the RHEL5 build. I am also removing the IPV6 constant where it appears in the wrong place. --- src/conf/nwfilter_conf.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/conf/nwfilter_conf.c b/src/conf/nwfilter_conf.c index d1c814831c..16c1a255ba 100644 --- a/src/conf/nwfilter_conf.c +++ b/src/conf/nwfilter_conf.c @@ -392,7 +392,9 @@ struct _virXMLAttr2Struct static const struct int_map macProtoMap[] = { INTMAP_ENTRY(ETHERTYPE_ARP , "arp"), INTMAP_ENTRY(ETHERTYPE_IP , "ipv4"), +#ifdef ETHERTYPE_IPV6 INTMAP_ENTRY(ETHERTYPE_IPV6, "ipv6"), +#endif INTMAP_ENTRY_LAST }; @@ -547,7 +549,6 @@ static const struct int_map ipProtoMap[] = { #ifdef IPPROTO_SCTP INTMAP_ENTRY(IPPROTO_SCTP, "sctp"), #endif - INTMAP_ENTRY(IPPROTO_IPV6, "ipv6"), INTMAP_ENTRY(IPPROTO_ICMPV6, "icmpv6"), INTMAP_ENTRY_LAST }; @@ -1124,7 +1125,7 @@ virNWFilterRuleDetailsParse(xmlNodePtr node, nwItemDesc *item; int int_val; unsigned int uint_val; - void *data_ptr, *storage_ptr; + void *data_ptr = NULL, *storage_ptr; valueValidator validator; char *match = virXMLPropString(node, "match"); nwIPAddress ipaddr; @@ -1550,7 +1551,7 @@ virNWFilterRuleParse(xmlNodePtr node) char *direction; char *prio; int found; - int found_i; + int found_i = 0; unsigned int priority; xmlNodePtr cur; -- 2.47.2