]> xenbits.xensource.com Git - libvirt.git/commitdiff
cleanup: Change datatype of net->stp to boolean
authorOsier Yang <jyang@redhat.com>
Fri, 12 Apr 2013 09:08:59 +0000 (17:08 +0800)
committerOsier Yang <jyang@redhat.com>
Sat, 13 Apr 2013 05:28:36 +0000 (13:28 +0800)
src/conf/network_conf.c
src/conf/network_conf.h

index 968cf11eebaacec9b6588ca28470a558dd2d36fc..75584a026db02f006d8a17c5c7812be2d4c17956 100644 (file)
@@ -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;
index 6ce9a002684423e05bb0ac537495afd818adc0da..1a86e3d5628c504aa441ff3bef4e44648b965d50 100644 (file)
@@ -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;