mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-09-09 09:14:57 +00:00
virqemu: Reflect return type of virJSONValueArraySize()
The virJSONValueArraySize() function return ssize_t (with possibly returning -1 if the passed json is not an array). Storing the return value into size_t is possibly dangerous then. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
041f35340b
commit
84b476e2bd
@ -85,7 +85,7 @@ virQEMUBuildCommandLineJSONArrayNumbered(const char *key,
|
||||
virBufferPtr buf)
|
||||
{
|
||||
const virJSONValue *member;
|
||||
size_t nelems = virJSONValueArraySize(array);
|
||||
ssize_t nelems = virJSONValueArraySize(array);
|
||||
char *prefix = NULL;
|
||||
size_t i;
|
||||
int ret = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user