Use nitems to count the number of items in a static array.
Sponsored by: ABT Systems Ltd
This commit is contained in:
parent
8f7467734a
commit
84a9a3a344
@ -100,7 +100,7 @@ struct db_variable db_regs[] = {
|
|||||||
{ "sp", DB_OFFSET(tf_sp), db_frame },
|
{ "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
|
void
|
||||||
db_show_mdpcpu(struct pcpu *pc)
|
db_show_mdpcpu(struct pcpu *pc)
|
||||||
|
Loading…
Reference in New Issue
Block a user