]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
Trivial fix: Add braces to for statement to avoid crashes
authorStefan Berger <stefanb@us.ibm.com>
Thu, 15 Apr 2010 01:24:21 +0000 (21:24 -0400)
committerStefan Berger <stefanb@us.ibm.com>
Thu, 15 Apr 2010 01:24:21 +0000 (21:24 -0400)
I am adding braces around the for statement that are now needed to due the
new sa_assert immediately following the for statement.

src/nwfilter/nwfilter_ebiptables_driver.c

index f54099f0985af2e97c5c795fb9bcf48e2c29cdb3..b71c356023ecf76e45d0eb47eff015311ca270c0 100644 (file)
@@ -2880,7 +2880,7 @@ ebiptablesApplyNewRules(virConnectPtr conn ATTRIBUTE_UNUSED,
     if (ebiptablesExecCLI(&buf, &cli_status) || cli_status != 0)
         goto tear_down_tmpebchains;
 
-    for (i = 0; i < nruleInstances; i++)
+    for (i = 0; i < nruleInstances; i++) {
         sa_assert (inst);
         switch (inst[i]->ruleType) {
         case RT_EBTABLES:
@@ -2895,6 +2895,7 @@ ebiptablesApplyNewRules(virConnectPtr conn ATTRIBUTE_UNUSED,
             haveIp6tables = true;
         break;
         }
+    }
 
     if (ebiptablesExecCLI(&buf, &cli_status) || cli_status != 0)
         goto tear_down_tmpebchains;