Use nitems to count the number of items in a static array.

Sponsored by:	ABT Systems Ltd
This commit is contained in:
Andrew Turner 2015-08-25 16:50:25 +00:00
parent 8f7467734a
commit 84a9a3a344

View File

@ -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)