]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
security: dac: Drop !parent handling in SetImageLabelInternal
authorCole Robinson <crobinso@redhat.com>
Mon, 7 Oct 2019 20:13:19 +0000 (16:13 -0400)
committerCole Robinson <crobinso@redhat.com>
Fri, 11 Oct 2019 18:25:59 +0000 (14:25 -0400)
The only caller always passes in a non-null parent

Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
src/security/security_dac.c

index 347a7a5f6399c8d754151ceaeeb0b1f98d6276db..b3e7c6bd17c9de0aa5de27dd0dd3011dabc56abd 100644 (file)
@@ -895,9 +895,8 @@ virSecurityDACSetImageLabelInternal(virSecurityManagerPtr mgr,
         return 0;
 
     disk_seclabel = virStorageSourceGetSecurityLabelDef(src, SECURITY_DAC_NAME);
-    if (parent)
-        parent_seclabel = virStorageSourceGetSecurityLabelDef(parent,
-                                                              SECURITY_DAC_NAME);
+    parent_seclabel = virStorageSourceGetSecurityLabelDef(parent,
+                                                          SECURITY_DAC_NAME);
 
     if (disk_seclabel && (!disk_seclabel->relabel || disk_seclabel->label)) {
         if (!disk_seclabel->relabel)