summaryrefslogtreecommitdiffstats
path: root/mandocdb.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2013-10-27 16:09:44 +0000
committerIngo Schwarze <schwarze@openbsd.org>2013-10-27 16:09:44 +0000
commit76da349d93ea5c3baff16da7953228a8920aeea6 (patch)
tree61ea031d90b42a860d6217b4d9b615c3c038a02d /mandocdb.c
parentb8a5cbbc3079357d3d38795b9f0332e8f98b76a5 (diff)
downloadmandoc-76da349d93ea5c3baff16da7953228a8920aeea6.tar.gz
delete duplicate NULL check and polish style;
no functional change
Diffstat (limited to 'mandocdb.c')
-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);