mem: Fix some reference use in range loops

This change fixes two cases of range loops, one where we can't use
lvalue reference, and one more where we have to use an lvalue
reference as we can't create a copy. In both cases clang would warn.

Change-Id: I760aa094af66be32a150bad37acc21d6fd512a65
Signed-off-by: Nikos Nikoleris <>
Reviewed-by: Jason Lowe-Power <>
Maintainer: Jason Lowe-Power <>
Tested-by: kokoro <>
3 files changed