commit | 1d4cbe768df73d86bbd16dbe648e9aee54f95116 | [log] [tgz] |
---|---|---|
author | Axel Lin <axel.lin@ingics.com> | Fri Nov 25 19:47:34 2016 +0800 |
committer | Dirk Ziegelmeier <dirk@ziegelmeier.net> | Fri Nov 25 13:02:23 2016 +0100 |
tree | 4a81f8db355b767e89830bb2801495752ceb49af | |
parent | 0e07ed4b13fb8a3f23158b11dc298b4c9486bbfb [diff] |
netif: Add proper lock protect for accessing netif->loop_first All the reset part of the code accessing netif->loop_first has lock protection, the only missing part is "while (netif->loop_first != NULL)". Fix it by adding lock protect around the while loop. Also convert the code to use while{} loop instead of do .. while{} loop, then we can avoid NULL test for in pointer in each loop and reduce a level of indent. Signed-off-by: Axel Lin <axel.lin@ingics.com>