diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index 968cf11eeb..75584a026d 100644 --- a/src/conf/network_conf.c +++ b/src/conf/network_conf.c @@ -1748,7 +1748,7 @@ virNetworkDefParseXML(xmlXPathContextPtr ctxt) /* Parse bridge information */ def->bridge = virXPathString("string(./bridge[1]/@name)", ctxt); stp = virXPathString("string(./bridge[1]/@stp)", ctxt); - def->stp = (stp && STREQ(stp, "off")) ? 0 : 1; + def->stp = (stp && STREQ(stp, "off")) ? false : true; if (virXPathULong("string(./bridge[1]/@delay)", ctxt, &def->delay) < 0) def->delay = 0; diff --git a/src/conf/network_conf.h b/src/conf/network_conf.h index 6ce9a00268..1a86e3d562 100644 --- a/src/conf/network_conf.h +++ b/src/conf/network_conf.h @@ -195,7 +195,7 @@ struct _virNetworkDef { char *bridge; /* Name of bridge device */ char *domain; unsigned long delay; /* Bridge forward delay (ms) */ - unsigned int stp :1; /* Spanning tree protocol */ + bool stp; /* Spanning tree protocol */ virMacAddr mac; /* mac address of bridge device */ bool mac_specified;