Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Jun 2016 18:52:57 +0000 (UTC)
From:      Zbigniew Bodek <zbb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r301281 - head/sys/arm/mv
Message-ID:  <201606031852.u53IqvVH052758@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <mst@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);
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606031852.u53IqvVH052758>