mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 20:45:18 +00:00
rpc: Make some functions void
There are few functions that currently return an integer but in fact they always return the same integer (zero). Make them void. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
1baead31fa
commit
ce87e7f2a6
@ -1082,11 +1082,10 @@ virNetLibsshSessionAuthAddKeyboardAuth(virNetLibsshSessionPtr sess,
|
||||
|
||||
}
|
||||
|
||||
int
|
||||
void
|
||||
virNetLibsshSessionSetChannelCommand(virNetLibsshSessionPtr sess,
|
||||
const char *command)
|
||||
{
|
||||
int ret = 0;
|
||||
virObjectLock(sess);
|
||||
|
||||
VIR_FREE(sess->channelCommand);
|
||||
@ -1094,7 +1093,6 @@ virNetLibsshSessionSetChannelCommand(virNetLibsshSessionPtr sess,
|
||||
sess->channelCommand = g_strdup(command);
|
||||
|
||||
virObjectUnlock(sess);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -35,8 +35,8 @@ typedef enum {
|
||||
VIR_NET_LIBSSH_HOSTKEY_VERIFY_IGNORE
|
||||
} virNetLibsshHostkeyVerify;
|
||||
|
||||
int virNetLibsshSessionSetChannelCommand(virNetLibsshSessionPtr sess,
|
||||
const char *command);
|
||||
void virNetLibsshSessionSetChannelCommand(virNetLibsshSessionPtr sess,
|
||||
const char *command);
|
||||
|
||||
int virNetLibsshSessionAuthSetCallback(virNetLibsshSessionPtr sess,
|
||||
virConnectAuthPtr auth);
|
||||
|
@ -969,8 +969,7 @@ virNetSocketNewConnectLibSSH2(const char *host,
|
||||
VIR_NET_SSH_HOSTKEY_FILE_CREATE) != 0)
|
||||
goto error;
|
||||
|
||||
if (virNetSSHSessionSetChannelCommand(sess, command) != 0)
|
||||
goto error;
|
||||
virNetSSHSessionSetChannelCommand(sess, command);
|
||||
|
||||
if (!(authMethodList = virStringSplit(authMethods, ",", 0)))
|
||||
goto error;
|
||||
@ -1101,8 +1100,7 @@ virNetSocketNewConnectLibssh(const char *host,
|
||||
verify) != 0)
|
||||
goto error;
|
||||
|
||||
if (virNetLibsshSessionSetChannelCommand(sess, command) != 0)
|
||||
goto error;
|
||||
virNetLibsshSessionSetChannelCommand(sess, command);
|
||||
|
||||
if (!(authMethodList = virStringSplit(authMethods, ",", 0)))
|
||||
goto error;
|
||||
|
@ -1132,11 +1132,10 @@ virNetSSHSessionAuthAddKeyboardAuth(virNetSSHSessionPtr sess,
|
||||
|
||||
}
|
||||
|
||||
int
|
||||
void
|
||||
virNetSSHSessionSetChannelCommand(virNetSSHSessionPtr sess,
|
||||
const char *command)
|
||||
{
|
||||
int ret = 0;
|
||||
virObjectLock(sess);
|
||||
|
||||
VIR_FREE(sess->channelCommand);
|
||||
@ -1144,7 +1143,6 @@ virNetSSHSessionSetChannelCommand(virNetSSHSessionPtr sess,
|
||||
sess->channelCommand = g_strdup(command);
|
||||
|
||||
virObjectUnlock(sess);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -40,8 +40,8 @@ typedef enum {
|
||||
VIR_NET_SSH_HOSTKEY_FILE_CREATE = 1 << 1,
|
||||
} virNetSSHHostKeyFileFlags;
|
||||
|
||||
int virNetSSHSessionSetChannelCommand(virNetSSHSessionPtr sess,
|
||||
const char *command);
|
||||
void virNetSSHSessionSetChannelCommand(virNetSSHSessionPtr sess,
|
||||
const char *command);
|
||||
|
||||
void virNetSSHSessionAuthReset(virNetSSHSessionPtr sess);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user