mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-12 15:52:55 +00:00
util: Remove need for local 'nelems'
Since it's only used in loop - just go direct.
This commit is contained in:
parent
e5c7ce8cd0
commit
6aba53468a
@ -85,12 +85,11 @@ virQEMUBuildCommandLineJSONArrayNumbered(const char *key,
|
||||
virBufferPtr buf)
|
||||
{
|
||||
const virJSONValue *member;
|
||||
ssize_t nelems = virJSONValueArraySize(array);
|
||||
char *prefix = NULL;
|
||||
size_t i;
|
||||
int ret = 0;
|
||||
|
||||
for (i = 0; i < nelems; i++) {
|
||||
for (i = 0; i < virJSONValueArraySize(array); i++) {
|
||||
member = virJSONValueArrayGet((virJSONValuePtr) array, i);
|
||||
|
||||
if (virAsprintf(&prefix, "%s.%zu", key, i) < 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user