Factor verify_table() out of ef_verify()
This commit is contained in:
parent
bea98f32c4
commit
c4a32b2fda
1 changed files with 16 additions and 9 deletions
|
@ -193,6 +193,20 @@ verify_row(int type, int row)
|
|||
return ret_val;
|
||||
}
|
||||
|
||||
static int
|
||||
verify_table(int type)
|
||||
{
|
||||
int retval = 0;
|
||||
int i;
|
||||
|
||||
if (!ef_cadef(type))
|
||||
return 0;
|
||||
verify_ca(type);
|
||||
for (i = 0; i < ef_nelem(type); i++)
|
||||
retval |= verify_row(type, i);
|
||||
return retval;
|
||||
}
|
||||
|
||||
static int
|
||||
verify_planes(int may_put)
|
||||
{
|
||||
|
@ -308,16 +322,9 @@ ef_verify(int may_put)
|
|||
{
|
||||
struct empfile *ep;
|
||||
int retval = 0;
|
||||
int i;
|
||||
|
||||
for (ep = empfile; ep->name; ep++) {
|
||||
if (!ef_cadef(ep->uid))
|
||||
continue;
|
||||
verify_ca(ep->uid);
|
||||
for (i = 0; i < ef_nelem(ep->uid); i++) {
|
||||
retval |= verify_row(ep->uid, i);
|
||||
}
|
||||
}
|
||||
for (ep = empfile; ep->name; ep++)
|
||||
retval |= verify_table(ep->uid);
|
||||
|
||||
/* Special checks */
|
||||
retval |= verify_planes(may_put);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue