15 Aug
2023
15 Aug
'23
9:32 a.m.
Nikolay Sivov (@nsivov) commented about dlls/mf/session.c:
+ struct topo_node *node = NULL, *found = NULL;
LIST_FOR_EACH_ENTRY(node, &session->presentation.nodes, struct topo_node, entry) { if (node->type == node_type && object == node->object.object) + { + found = node; break; + } }
- return node; + if (!found) + WARN("Failed to find object %p.\n", object); + return found; } This is too complicated, simply return "node" from within the loop, and NULL otherwise.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/3572#note_42288