提交 93002b98 编写于 作者: O Osier Yang

cleanup: Change datatype of net->stp to boolean

上级 f2adc3b4
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册