mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 07:05:28 +00:00
cleanup: Change datatype of net->stp to boolean
This commit is contained in:
parent
f2adc3b435
commit
93002b9827
@ -1748,7 +1748,7 @@ virNetworkDefParseXML(xmlXPathContextPtr ctxt)
|
|||||||
/* Parse bridge information */
|
/* Parse bridge information */
|
||||||
def->bridge = virXPathString("string(./bridge[1]/@name)", ctxt);
|
def->bridge = virXPathString("string(./bridge[1]/@name)", ctxt);
|
||||||
stp = virXPathString("string(./bridge[1]/@stp)", 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)
|
if (virXPathULong("string(./bridge[1]/@delay)", ctxt, &def->delay) < 0)
|
||||||
def->delay = 0;
|
def->delay = 0;
|
||||||
|
@ -195,7 +195,7 @@ struct _virNetworkDef {
|
|||||||
char *bridge; /* Name of bridge device */
|
char *bridge; /* Name of bridge device */
|
||||||
char *domain;
|
char *domain;
|
||||||
unsigned long delay; /* Bridge forward delay (ms) */
|
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 */
|
virMacAddr mac; /* mac address of bridge device */
|
||||||
bool mac_specified;
|
bool mac_specified;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user