summaryrefslogtreecommitdiffstats
path: root/mdoc_validate.c
diff options
context:
space:
mode:
Diffstat (limited to 'mdoc_validate.c')
-rw-r--r--mdoc_validate.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c
index e79796e9..0b3bf0f4 100644
--- a/mdoc_validate.c
+++ b/mdoc_validate.c
@@ -1240,20 +1240,19 @@ post_sh_head(POST_ARGS)
/*
* Check particular section/manual conventions. LIBRARY can
- * only occur in msec 2, 3 (TODO: are there more of these?).
+ * only occur in manual section 2, 3, and 9.
*/
switch (sec) {
case (SEC_LIBRARY):
- switch (mdoc->meta.msec) {
- case (2):
- /* FALLTHROUGH */
- case (3):
+ assert(mdoc->meta.msec);
+ if (*mdoc->meta.msec == '2')
break;
- default:
- return(mdoc_nwarn(mdoc, mdoc->last, EWRONGMSEC));
- }
- break;
+ if (*mdoc->meta.msec == '3')
+ break;
+ if (*mdoc->meta.msec == '9')
+ break;
+ return(mdoc_nwarn(mdoc, mdoc->last, EWRONGMSEC));
default:
break;
}