(ef_verify): Check pchr[].p_level matches pchr[].p_type.
This commit is contained in:
parent
7d75e2b8d3
commit
5e66e5bdee
1 changed files with 11 additions and 0 deletions
|
@ -170,5 +170,16 @@ ef_verify()
|
||||||
retval += verify_row(ep->uid, i);
|
retval += verify_row(ep->uid, i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Special checks */
|
||||||
|
for (i = 0; pchr[i].p_sname; i++) {
|
||||||
|
if ((pchr[i].p_type >= 0) == (pchr[i].p_level >= 0)) {
|
||||||
|
fprintf(stderr,
|
||||||
|
"Config %s uid %d field level doesn't match field type\n",
|
||||||
|
ef_nameof(EF_PRODUCT), i);
|
||||||
|
retval = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue