More indentation fixes

Reindent nwfilter gentech driver and one block in rbd storage backend.
This commit is contained in:
Ján Tomko 2014-06-27 11:25:05 +02:00
parent e87ab4c68d
commit 275f022454
2 changed files with 34 additions and 34 deletions

View File

@ -105,12 +105,12 @@ virNWFilterTechDriverForName(const char *name)
{ {
size_t i = 0; size_t i = 0;
while (filter_tech_drivers[i]) { while (filter_tech_drivers[i]) {
if (STREQ(filter_tech_drivers[i]->name, name)) { if (STREQ(filter_tech_drivers[i]->name, name)) {
if ((filter_tech_drivers[i]->flags & TECHDRV_FLAG_INITIALIZED) == 0) if ((filter_tech_drivers[i]->flags & TECHDRV_FLAG_INITIALIZED) == 0)
break; break;
return filter_tech_drivers[i]; return filter_tech_drivers[i];
} }
i++; i++;
} }
return NULL; return NULL;
} }
@ -212,10 +212,10 @@ virNWFilterCreateVarHashmap(char *macaddr,
*/ */
struct printString struct printString
{ {
virBuffer buf; virBuffer buf;
const char *separator; const char *separator;
bool reportMAC; bool reportMAC;
bool reportIP; bool reportIP;
}; };
@ -250,21 +250,21 @@ virNWFilterPrintVars(virHashTablePtr vars,
bool reportMAC, bool reportMAC,
bool reportIP) bool reportIP)
{ {
struct printString ps = { struct printString ps = {
.buf = VIR_BUFFER_INITIALIZER, .buf = VIR_BUFFER_INITIALIZER,
.separator = separator, .separator = separator,
.reportMAC = reportMAC, .reportMAC = reportMAC,
.reportIP = reportIP, .reportIP = reportIP,
}; };
virHashForEach(vars, printString, &ps); virHashForEach(vars, printString, &ps);
if (virBufferError(&ps.buf)) { if (virBufferError(&ps.buf)) {
virBufferFreeAndReset(&ps.buf); virBufferFreeAndReset(&ps.buf);
virReportOOMError(); virReportOOMError();
return NULL; return NULL;
} }
return virBufferContentAndReset(&ps.buf); return virBufferContentAndReset(&ps.buf);
} }
@ -573,9 +573,9 @@ virNWFilterDetermineMissingVarsRec(virNWFilterDefPtr filter,
if (obj->newDef) { if (obj->newDef) {
next_filter = obj->newDef; next_filter = obj->newDef;
} }
break; break;
case INSTANTIATE_ALWAYS: case INSTANTIATE_ALWAYS:
break; break;
} }
rc = virNWFilterDetermineMissingVarsRec(next_filter, rc = virNWFilterDetermineMissingVarsRec(next_filter,
@ -703,7 +703,7 @@ virNWFilterInstantiate(const unsigned char *vmuuid ATTRIBUTE_UNUSED,
goto err_exit; goto err_exit;
} }
} else } else
goto err_unresolvable_vars; goto err_unresolvable_vars;
} else if (virHashSize(missing_vars->hashTable) > 1) { } else if (virHashSize(missing_vars->hashTable) > 1) {
goto err_unresolvable_vars; goto err_unresolvable_vars;
} else if (!forceWithPendingReq && } else if (!forceWithPendingReq &&
@ -723,10 +723,10 @@ virNWFilterInstantiate(const unsigned char *vmuuid ATTRIBUTE_UNUSED,
switch (useNewFilter) { switch (useNewFilter) {
case INSTANTIATE_FOLLOW_NEWFILTER: case INSTANTIATE_FOLLOW_NEWFILTER:
instantiate = *foundNewFilter; instantiate = *foundNewFilter;
break; break;
case INSTANTIATE_ALWAYS: case INSTANTIATE_ALWAYS:
instantiate = true; instantiate = true;
break; break;
} }
if (instantiate) { if (instantiate) {
@ -857,10 +857,10 @@ __virNWFilterInstantiateFilter(virNWFilterDriverStatePtr driver,
filter = obj->newDef; filter = obj->newDef;
*foundNewFilter = true; *foundNewFilter = true;
} }
break; break;
case INSTANTIATE_ALWAYS: case INSTANTIATE_ALWAYS:
break; break;
} }
rc = virNWFilterInstantiate(vmuuid, rc = virNWFilterInstantiate(vmuuid,
@ -1087,7 +1087,7 @@ _virNWFilterTeardownFilter(const char *ifname)
virNWFilterTerminateLearnReq(ifname); virNWFilterTerminateLearnReq(ifname);
if (virNWFilterLockIface(ifname) < 0) if (virNWFilterLockIface(ifname) < 0)
return -1; return -1;
techdriver->allTeardown(ifname); techdriver->allTeardown(ifname);

View File

@ -196,9 +196,9 @@ static int virStorageBackendRBDOpenRADOSConn(virStorageBackendRBDStatePtr ptr,
mon_buff = virBufferContentAndReset(&mon_host); mon_buff = virBufferContentAndReset(&mon_host);
VIR_DEBUG("RADOS mon_host has been set to: %s", mon_buff); VIR_DEBUG("RADOS mon_host has been set to: %s", mon_buff);
if (rados_conf_set(ptr->cluster, "mon_host", mon_buff) < 0) { if (rados_conf_set(ptr->cluster, "mon_host", mon_buff) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("failed to set RADOS option: %s"), _("failed to set RADOS option: %s"),
"mon_host"); "mon_host");
goto cleanup; goto cleanup;
} }