On Monday, February 22, 2016 22:56:34 Sven Eckelmann wrote:
batadv_iv_ogm_orig_del_if handles two different buffers bcast_own and bcast_own_sum which should be resized. The error handling two for allocating these buffers causes the complexity of this function. This can be avoided completely when the function is split into a main function handling the locking, freeing and call of the subfunctions.
The subfunction can then independently handle the resize of the buffers. This also allows to easily reuse the old buffer (which always is larger) in case a smaller buffer could not be allocated without increasing the code complexity.
Signed-off-by: Sven Eckelmann sven@narfation.org
net/batman-adv/bat_iv_ogm.c | 131 ++++++++++++++++++++++++++++---------------- 1 file changed, 84 insertions(+), 47 deletions(-)
Applied in revision 1c5fc73.
Thanks, Marek