summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mandocdb.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/mandocdb.c b/mandocdb.c
index 12b7b4d3..c698e0eb 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -836,13 +836,13 @@ ofadd(int dform, const char *file, const char *name, const char *dsec,
if (NULL == arch)
arch = "";
- sform = FORM_NONE;
- if (NULL != sec && *sec <= '9' && *sec >= '1')
- sform = FORM_SRC;
- else if (NULL != sec && *sec == '0') {
+ if ('0' == *sec) {
sec = dsec;
sform = FORM_CAT;
- }
+ } else if ('1' <= *sec && '9' >= *sec)
+ sform = FORM_SRC;
+ else
+ sform = FORM_NONE;
of = mandoc_calloc(1, sizeof(struct of));
strlcpy(of->file, file, PATH_MAX);