vircommand: Drop unused arguments from virCommandMassCloseGetFDs*()
Both virCommandMassCloseGetFDsLinux() and virCommandMassCloseGetFDsGeneric() take @cmd argument only to mark it as unused. Drop it from both. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
8cf7d0d457
commit
dfe496ae33
@ -478,8 +478,7 @@ virExecCommon(virCommand *cmd, gid_t *groups, int ngroups)
|
|||||||
* onto child process (well, the one we will exec soon since this
|
* onto child process (well, the one we will exec soon since this
|
||||||
* is called from the child). */
|
* is called from the child). */
|
||||||
static int
|
static int
|
||||||
virCommandMassCloseGetFDsLinux(virCommand *cmd G_GNUC_UNUSED,
|
virCommandMassCloseGetFDsLinux(virBitmap *fds)
|
||||||
virBitmap *fds)
|
|
||||||
{
|
{
|
||||||
g_autoptr(DIR) dp = NULL;
|
g_autoptr(DIR) dp = NULL;
|
||||||
struct dirent *entry;
|
struct dirent *entry;
|
||||||
@ -511,8 +510,7 @@ virCommandMassCloseGetFDsLinux(virCommand *cmd G_GNUC_UNUSED,
|
|||||||
# else /* !__linux__ */
|
# else /* !__linux__ */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
virCommandMassCloseGetFDsGeneric(virCommand *cmd G_GNUC_UNUSED,
|
virCommandMassCloseGetFDsGeneric(virBitmap *fds)
|
||||||
virBitmap *fds)
|
|
||||||
{
|
{
|
||||||
virBitmapSetAll(fds);
|
virBitmapSetAll(fds);
|
||||||
return 0;
|
return 0;
|
||||||
@ -547,10 +545,10 @@ virCommandMassCloseFrom(virCommand *cmd,
|
|||||||
fds = virBitmapNew(openmax);
|
fds = virBitmapNew(openmax);
|
||||||
|
|
||||||
# ifdef __linux__
|
# ifdef __linux__
|
||||||
if (virCommandMassCloseGetFDsLinux(cmd, fds) < 0)
|
if (virCommandMassCloseGetFDsLinux(fds) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
# else
|
# else
|
||||||
if (virCommandMassCloseGetFDsGeneric(cmd, fds) < 0)
|
if (virCommandMassCloseGetFDsGeneric(fds) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user