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));
        }
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to