Remove unnecessary virFileIsExecutable check after virFindFileInPath.
Since the commit
9ae992f virFindFileInPath will reject non-executables.
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
binary = virFindFileInPath("grub-bhyve");
if (binary == NULL)
goto out;
- if (!virFileIsExecutable(binary))
- goto out;
cmd = virCommandNew(binary);
virCommandAddArg(cmd, "--help");
binary = virFindFileInPath("bhyve");
if (binary == NULL)
goto out;
- if (!virFileIsExecutable(binary))
- goto out;
if ((ret = bhyveProbeCapsRTC_UTC(caps, binary)))
goto out;
char *binary = NULL;
if (virAsprintf(&binary, format, archstr) < 0)
- goto out;
+ return NULL;
ret = virFindFileInPath(binary);
VIR_FREE(binary);
- if (ret && virFileIsExecutable(ret))
- goto out;
-
- VIR_FREE(ret);
-
- out:
return ret;
}