Date: Tue, 3 Nov 2020 14:44:33 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367298 - head/sys/compat/linux Message-ID: <202011031444.0A3EiX1p043076@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trasz Date: Tue Nov 3 14:44:33 2020 New Revision: 367298 URL: https://svnweb.freebsd.org/changeset/base/367298 Log: Fix rookie mistake - it's nitems(), not sizeof(). Reported by: xtouqh_icloud.com MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/sys/compat/linux/linux_errno.c Modified: head/sys/compat/linux/linux_errno.c ============================================================================== --- head/sys/compat/linux/linux_errno.c Tue Nov 3 14:41:49 2020 (r367297) +++ head/sys/compat/linux/linux_errno.c Tue Nov 3 14:44:33 2020 (r367298) @@ -27,7 +27,7 @@ linux_check_errtbl(void) { int i; - for (i = 1; i < sizeof(linux_errtbl); i++) { + for (i = 1; i < nitems(linux_errtbl); i++) { KASSERT(linux_errtbl[i] != 0, ("%s: linux_errtbl[%d] == 0", __func__, i)); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202011031444.0A3EiX1p043076>