refactor common logic into abortOnKeyOrValueSizeMismatch

Per request on:
  https://googleplex-android-review.googlesource.com/c/platform/frameworks/libs/net/+/18992756

While we're at it let's temporarily remove the check in .reset(fd)
  if (bpfGetFdMapFlags(mMapFd) != 0) abort(); // TODO: fix for BpfMapRO

We'll add it back when the code is in better shape,
and read-only vs read-write state of the map is something
we actually *know*.

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Id8d65bdc529872685b42656e638f22048fafb7f6
1 file changed
tree: 3d0406590f8320a0d083a9e1d76f546bfe2fff28
  1. staticlibs/