Date: Tue, 25 Aug 2015 16:50:26 +0000 (UTC) From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287135 - head/sys/arm64/arm64 Message-ID: <201508251650.t7PGoQEm036588@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: andrew Date: Tue Aug 25 16:50:25 2015 New Revision: 287135 URL: https://svnweb.freebsd.org/changeset/base/287135 Log: Use nitems to count the number of items in a static array. Sponsored by: ABT Systems Ltd Modified: head/sys/arm64/arm64/db_interface.c Modified: head/sys/arm64/arm64/db_interface.c ============================================================================== --- head/sys/arm64/arm64/db_interface.c Tue Aug 25 16:49:10 2015 (r287134) +++ head/sys/arm64/arm64/db_interface.c Tue Aug 25 16:50:25 2015 (r287135) @@ -100,7 +100,7 @@ struct db_variable db_regs[] = { { "sp", DB_OFFSET(tf_sp), db_frame }, }; -struct db_variable *db_eregs = db_regs + sizeof(db_regs)/sizeof(db_regs[0]); +struct db_variable *db_eregs = db_regs + nitems(db_regs); void db_show_mdpcpu(struct pcpu *pc)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201508251650.t7PGoQEm036588>