Use nullptr instead of reinterpret_cast of NULL to pointer type

musl libc defines NULL as nullptr, which is explicitly allowed by
C++11.  nullptr_t cannot be cast to a pointer with reinterpret_cast,
static_cast must be used instead.  Use nullptr directly instead,
which doesn't require a cast to be compared to a pointer type.
Also use static_cast for the cast from void* to int*.

Bug: 190084016
Test: m USE_HOST_MUSL=true host-native
Change-Id: I1c6d92a88fd4518c73b3fb8e39de19e9b249615a
Reviewed-by: Francois Pierre Doray <>
Reviewed-by: Hidehiko Abe <>
Commit-Queue: Colin Cross <>
Cr-Commit-Position: refs/heads/main@{#966067}
1 file changed