mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
virSecurityDACSetOwnershipInternal: Drop dead code
The virSecurityDACSetOwnershipInternal() function accepts two arguments (among others): @path and @src. The idea being that in some cases @path is NULL and @src is not and then @path is filled from @src->path. However, this is done in both callers already (because of seclabel remembering/recall). Therefore, this code in virSecurityDACSetOwnershipInternal() is dead, effectively. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
4ac78b95d3
commit
5cfb3369b1
@ -688,15 +688,8 @@ virSecurityDACSetOwnershipInternal(const virSecurityDACData *priv,
|
||||
} else {
|
||||
struct stat sb;
|
||||
|
||||
if (!path) {
|
||||
if (!src || !src->path)
|
||||
return 0;
|
||||
|
||||
if (!virStorageSourceIsLocalStorage(src))
|
||||
return 0;
|
||||
|
||||
path = src->path;
|
||||
}
|
||||
if (!path)
|
||||
return 0;
|
||||
|
||||
if (stat(path, &sb) < 0) {
|
||||
virReportSystemError(errno, _("unable to stat: %s"), path);
|
||||
|
Loading…
x
Reference in New Issue
Block a user