pdr: pldm_entity_association_pdr_extract(): Use a for-loop

The while-loop initialisation and maintenance can be trivially
compressed by a for-loop.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I591e2c55f8e340d637d69001d6a0a630100921af
diff --git a/src/pdr.c b/src/pdr.c
index a60e229..6c321ad 100644
--- a/src/pdr.c
+++ b/src/pdr.c
@@ -1318,15 +1318,12 @@
 	(*entities)->entity_container_id =
 		le16toh(entity_association_pdr->container.entity_container_id);
 	pldm_entity *curr_entity = entity_association_pdr->children;
-	size_t i = 1;
-	while (i < *num_entities) {
+	for (size_t i = 1; i < *num_entities; i++, curr_entity++) {
 		(*entities + i)->entity_type =
 			le16toh(curr_entity->entity_type);
 		(*entities + i)->entity_instance_num =
 			le16toh(curr_entity->entity_instance_num);
 		(*entities + i)->entity_container_id =
 			le16toh(curr_entity->entity_container_id);
-		++curr_entity;
-		++i;
 	}
 }