bandwidth: Fix funky identation

This commit is contained in:
Michal Privoznik
2011-11-29 14:25:40 +01:00
parent 6b84ee3370
commit dee901c1ff

View File

@@ -90,8 +90,8 @@ virNetDevBandwidthSet(const char *ifname,
virCommandFree(cmd); virCommandFree(cmd);
cmd = virCommandNew(TC); cmd = virCommandNew(TC);
virCommandAddArgList(cmd,"class", "add", "dev", ifname, "parent", virCommandAddArgList(cmd,"class", "add", "dev", ifname, "parent",
"1:", "classid", "1:1", "htb", NULL); "1:", "classid", "1:1", "htb", NULL);
virCommandAddArgList(cmd, "rate", average, NULL); virCommandAddArgList(cmd, "rate", average, NULL);
if (peak) if (peak)
@@ -104,9 +104,9 @@ virNetDevBandwidthSet(const char *ifname,
virCommandFree(cmd); virCommandFree(cmd);
cmd = virCommandNew(TC); cmd = virCommandNew(TC);
virCommandAddArgList(cmd,"filter", "add", "dev", ifname, "parent", virCommandAddArgList(cmd,"filter", "add", "dev", ifname, "parent",
"1:0", "protocol", "ip", "handle", "1", "fw", "1:0", "protocol", "ip", "handle", "1", "fw",
"flowid", "1", NULL); "flowid", "1", NULL);
if (virCommandRun(cmd, NULL) < 0) if (virCommandRun(cmd, NULL) < 0)
goto cleanup; goto cleanup;
@@ -243,23 +243,23 @@ bool
virNetDevBandwidthEqual(virNetDevBandwidthPtr a, virNetDevBandwidthEqual(virNetDevBandwidthPtr a,
virNetDevBandwidthPtr b) virNetDevBandwidthPtr b)
{ {
if (!a && !b) if (!a && !b)
return true;
if (!a || !b)
return false;
/* in */
if (a->in->average != b->in->average ||
a->in->peak != b->in->peak ||
a->in->burst != b->in->burst)
return false;
/*out*/
if (a->out->average != b->out->average ||
a->out->peak != b->out->peak ||
a->out->burst != b->out->burst)
return false;
return true; return true;
if (!a || !b)
return false;
/* in */
if (a->in->average != b->in->average ||
a->in->peak != b->in->peak ||
a->in->burst != b->in->burst)
return false;
/*out*/
if (a->out->average != b->out->average ||
a->out->peak != b->out->peak ||
a->out->burst != b->out->burst)
return false;
return true;
} }