@@ -339,10 +339,10 @@ nvdimm_build_structure_caps(GArray *structures, uint32_t capabilities)
339
339
340
340
static GArray * nvdimm_build_device_structure (NVDIMMState * state )
341
341
{
342
- GSList * device_list = nvdimm_get_device_list ();
342
+ GSList * device_list , * list = nvdimm_get_device_list ();
343
343
GArray * structures = g_array_new (false, true /* clear */ , 1 );
344
344
345
- for (; device_list ; device_list = device_list -> next ) {
345
+ for (device_list = list ; device_list ; device_list = device_list -> next ) {
346
346
DeviceState * dev = device_list -> data ;
347
347
348
348
/* build System Physical Address Range Structure. */
@@ -357,7 +357,7 @@ static GArray *nvdimm_build_device_structure(NVDIMMState *state)
357
357
/* build NVDIMM Control Region Structure. */
358
358
nvdimm_build_structure_dcr (structures , dev );
359
359
}
360
- g_slist_free (device_list );
360
+ g_slist_free (list );
361
361
362
362
if (state -> persistence ) {
363
363
nvdimm_build_structure_caps (structures , state -> persistence );
@@ -1333,9 +1333,9 @@ static void nvdimm_build_ssdt(GArray *table_offsets, GArray *table_data,
1333
1333
1334
1334
void nvdimm_build_srat (GArray * table_data )
1335
1335
{
1336
- GSList * device_list = nvdimm_get_device_list ();
1336
+ GSList * device_list , * list = nvdimm_get_device_list ();
1337
1337
1338
- for (; device_list ; device_list = device_list -> next ) {
1338
+ for (device_list = list ; device_list ; device_list = device_list -> next ) {
1339
1339
DeviceState * dev = device_list -> data ;
1340
1340
Object * obj = OBJECT (dev );
1341
1341
uint64_t addr , size ;
@@ -1348,7 +1348,7 @@ void nvdimm_build_srat(GArray *table_data)
1348
1348
build_srat_memory (table_data , addr , size , node ,
1349
1349
MEM_AFFINITY_ENABLED | MEM_AFFINITY_NON_VOLATILE );
1350
1350
}
1351
- g_slist_free (device_list );
1351
+ g_slist_free (list );
1352
1352
}
1353
1353
1354
1354
void nvdimm_build_acpi (GArray * table_offsets , GArray * table_data ,
0 commit comments