From a7262a664d514b6d9f49c6e40b5a581b9bc271ec Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Mon, 7 Oct 2019 16:13:19 -0400 Subject: [PATCH] security: dac: Drop !parent handling in SetImageLabelInternal The only caller always passes in a non-null parent Reviewed-by: Daniel Henrique Barboza Reviewed-by: Michal Privoznik Signed-off-by: Cole Robinson --- src/security/security_dac.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/security/security_dac.c b/src/security/security_dac.c index 347a7a5f63..b3e7c6bd17 100644 --- a/src/security/security_dac.c +++ b/src/security/security_dac.c @@ -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)