MFC r315686,r315688:
r315686:
kvm_geterr: handle kd == NULL in a deterministic/graceful manner
Return a NUL string instead of just working by accident with kvm_geterr(3)
when MALLOC_PRODUCTION is disabled (I didn't confirm the MALLOC_PRODUCTION
being enabled path).
Document the new explicit return behavior for kvm_geterr(3), as well
as the previous implicit behavior, i.e., the buffer attached to
returned via kvm_geterr(3) would be empty if a previous error hadn't been
stored in kd.
r315688:
kvm_write: fix -Wcast-qual warning in pointer arithmetic argument
Cast buf to const char * when doing arithmetic operation to match
cp's type [1].