mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 11:35:19 +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