07-01-2022, 10:46 AM
The third operand of the for statement has an assignment. Does the calculation violate the result that the assignment operator should not be used?
for ( pos = (&dev->list)->next, q = pos->next; pos != (&dev->list); pos = q, q = pos->next ) {/* */}
for ( pos = (&dev->list)->next, q = pos->next; pos != (&dev->list); pos = q, q = pos->next ) {/* */}