]> git.ipfire.org Git - thirdparty/hostap.git/commit
RRM: Move wpabuf_resize() call into wpas_rrm_report_elem()
authorJouni Malinen <j@w1.fi>
Sat, 7 Jan 2017 10:04:43 +0000 (12:04 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 7 Jan 2017 10:13:20 +0000 (12:13 +0200)
commit5cda350896812f0d1eec6a751b194027e2ccf1fc
tree7fb0435b186b4506be742c57aaf913b93599128c
parent64dbe6a78d3eaec563593d5aadaa4a6ebe25d9f6
RRM: Move wpabuf_resize() call into wpas_rrm_report_elem()

wpabuf_resize() can handle the initial allocation of a wpabuf and all
the other callers of wpas_rrm_report_elem() were already using a pointer
to a pointer and a wpabuf_resize() call. Simplify this by resizing the
wpabuf (if needed) within wpas_rrm_report_elem() instead of having to
calculate the needed size in all the callers. Thsi is also fixing one of
the allocation sizes to use the correct size instead of a size of a
struct that has nothing to do with the allocation (but is larger than
the needed five octets, so does not break anything).

Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/rrm.c