Huw Davies (@huw) commented about dlls/nsiproxy.sys/ndis.c:
pthread_mutex_lock( &if_list_lock );
- update_if_table();
- do
- {
LIST_FOR_EACH_ENTRY( entry, &if_list, struct if_entry, entry )
if (entry->if_luid.Value == luid->Value)
{
*unix_name = entry->if_unix_name;
ret = TRUE;
goto done;
}
update_if_table();
- }
- while (!updated++);
Now we could end up calling `update_if_table()` twice which seems wasteful.
How about making `update_if_table()` return the number of entries it adds, then we could do something like ```c do {
} while (!updated++ && update_if_table()); ```
Also, please keep the `while` on the same line as the closing brace (so it doesn't look like a while loop) and add braces around the `LIST_FOR_EACH_ENTRY()` block.