]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
selinux: Cleanup coding style
authorPeter Krempa <pkrempa@redhat.com>
Tue, 2 Jul 2013 16:27:09 +0000 (18:27 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 8 Jul 2013 13:04:07 +0000 (15:04 +0200)
src/security/security_selinux.c

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