libertas: clean up and clarify get_common_rates
Clarify what the heck the function is doing with better variable names and less indirection and better comments. Also ensure callers use the proper minimum size, even though all rates arrays should be size MAX_RATES anyway. Reverts part of Andrey's dynamic alloc patch since we don't really need it. Also leaves the passed-in rates array alone on errors. Signed-off-by: NDan Williams <dcbw@redhat.com> Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
Showing
想要评论请 注册 或 登录