Author: zbb
Date: Fri Jun  3 18:52:57 2016
New Revision: 301281
URL: https://svnweb.freebsd.org/changeset/base/301281

Log:
  Use nitems() macro instead of re-inventing it
  
  Fixed after r301221.
  
  Pointed out by:       oshogbo
  Submitted by: Michal Stanek <m...@semihalf.com>
  Obtained from:        Semihalf

Modified:
  head/sys/arm/mv/mv_common.c

Modified: head/sys/arm/mv/mv_common.c
==============================================================================
--- head/sys/arm/mv/mv_common.c Fri Jun  3 18:37:56 2016        (r301280)
+++ head/sys/arm/mv/mv_common.c Fri Jun  3 18:52:57 2016        (r301281)
@@ -2131,7 +2131,7 @@ moveon:
                return (0);
 
        t++;
-       if (t >= ((sizeof(cpu_win_tbl))/(sizeof(cpu_win_tbl[0])))) {
+       if (t >= nitems(cpu_win_tbl)) {
                debugf("cannot fit CESA tuple into cpu_win_tbl\n");
                return (ENOMEM);
        }
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to