MFC r277485 by rrs: Fix minor errors found by coverity.PR: 201594Sponsored by: The FreeBSD Foundation
MFC of r280697 and r280698Sponsored by: Netflix Inc.