mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
virDomainAuthorizedSSHKeysSet: Use uint for @nkeys
When introducing the API I've mistakenly used 'int' type for @nkeys argument which does nothing more than tells the API how many items there are in @keys array. Obviously, negative values are not expected and therefore 'unsigned int' should have been used. Reported-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
f1c3d847ec
commit
cbf33fbaf6
@ -5115,7 +5115,7 @@ typedef enum {
|
||||
int virDomainAuthorizedSSHKeysSet(virDomainPtr domain,
|
||||
const char *user,
|
||||
const char **keys,
|
||||
int nkeys,
|
||||
unsigned int nkeys,
|
||||
unsigned int flags);
|
||||
|
||||
#endif /* LIBVIRT_DOMAIN_H */
|
||||
|
@ -1397,7 +1397,7 @@ typedef int
|
||||
(*virDrvDomainAuthorizedSSHKeysSet)(virDomainPtr domain,
|
||||
const char *user,
|
||||
const char **keys,
|
||||
int nkeys,
|
||||
unsigned int nkeys,
|
||||
unsigned int flags);
|
||||
|
||||
typedef struct _virHypervisorDriver virHypervisorDriver;
|
||||
|
@ -12853,12 +12853,12 @@ int
|
||||
virDomainAuthorizedSSHKeysSet(virDomainPtr domain,
|
||||
const char *user,
|
||||
const char **keys,
|
||||
int nkeys,
|
||||
unsigned int nkeys,
|
||||
unsigned int flags)
|
||||
{
|
||||
virConnectPtr conn;
|
||||
|
||||
VIR_DOMAIN_DEBUG(domain, "user=%s, keys=%p, nkeys=%d, flags=0x%x",
|
||||
VIR_DOMAIN_DEBUG(domain, "user=%s, keys=%p, nkeys=%u, flags=0x%x",
|
||||
user, keys, nkeys, flags);
|
||||
|
||||
virResetLastError();
|
||||
|
@ -20134,7 +20134,7 @@ static int
|
||||
qemuDomainAuthorizedSSHKeysSet(virDomainPtr dom,
|
||||
const char *user,
|
||||
const char **keys,
|
||||
int nkeys,
|
||||
unsigned int nkeys,
|
||||
unsigned int flags)
|
||||
{
|
||||
virQEMUDriverPtr driver = dom->conn->privateData;
|
||||
|
@ -8066,7 +8066,7 @@ static int
|
||||
remoteDomainAuthorizedSSHKeysSet(virDomainPtr domain,
|
||||
const char *user,
|
||||
const char **keys,
|
||||
int nkeys,
|
||||
unsigned int nkeys,
|
||||
unsigned int flags)
|
||||
{
|
||||
int rv = -1;
|
||||
|
Loading…
Reference in New Issue
Block a user