1
0

selinux: Cleanup coding style

This commit is contained in:
Peter Krempa 2013-07-02 18:27:09 +02:00
parent a443c3a77a
commit e45ee23c59

View File

@ -589,23 +589,22 @@ virSecuritySELinuxGenSecurityLabel(virSecurityManagerPtr mgr,
int catMin, catMax; int catMin, catMax;
seclabel = virDomainDefGetSecurityLabelDef(def, SECURITY_SELINUX_NAME); seclabel = virDomainDefGetSecurityLabelDef(def, SECURITY_SELINUX_NAME);
if (seclabel == NULL) { if (seclabel == NULL)
return rc; return rc;
}
data = virSecurityManagerGetPrivateData(mgr); data = virSecurityManagerGetPrivateData(mgr);
VIR_DEBUG("label=%s", virSecurityManagerGetDriver(mgr)); VIR_DEBUG("label=%s", virSecurityManagerGetDriver(mgr));
if (seclabel->type == VIR_DOMAIN_SECLABEL_DYNAMIC && if (seclabel->type == VIR_DOMAIN_SECLABEL_DYNAMIC &&
seclabel->label) { seclabel->label) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
"%s", _("security label already defined for VM")); _("security label already defined for VM"));
return rc; return rc;
} }
if (seclabel->imagelabel) { if (seclabel->imagelabel) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
"%s", _("security image label already defined for VM")); _("security image label already defined for VM"));
return rc; return rc;
} }
@ -628,8 +627,7 @@ virSecuritySELinuxGenSecurityLabel(virSecurityManagerPtr mgr,
return rc; return rc;
} }
range = context_range_get(ctx); if (!(range = context_range_get(ctx))) {
if (!range) {
virReportOOMError(); virReportOOMError();
goto cleanup; goto cleanup;
} }