HomeFreeBSD

getvfsbyname: prefer sizeof to strlen even for constants

Description

getvfsbyname: prefer sizeof to strlen even for constants

Clang is smart enough to evaluate strlen() of a constant at compile-time.
However, that won't work in the future if we compile libc with
-ffreestanding.

Reported by: kib
Dissenting: ngie, cem
Sponsored by: The FreeBSD Foundation

Details

Provenance
asomersAuthored on
Parents
rS348053: MFC r347216:
Branches
Unknown
Tags
Unknown