diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2013-10-27 16:09:44 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2013-10-27 16:09:44 +0000 |
commit | 76da349d93ea5c3baff16da7953228a8920aeea6 (patch) | |
tree | 61ea031d90b42a860d6217b4d9b615c3c038a02d /mandocdb.c | |
parent | b8a5cbbc3079357d3d38795b9f0332e8f98b76a5 (diff) | |
download | mandoc-76da349d93ea5c3baff16da7953228a8920aeea6.tar.gz |
delete duplicate NULL check and polish style;
no functional change
Diffstat (limited to 'mandocdb.c')
-rw-r--r-- | mandocdb.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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); |