aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit20511656c21f33d0727c770400e9597a87775aa2 (patch)
tree29c8676f0d49e20b255ec5a86f4c812c25e0cd6f /mandocdb.c
parent40aba23d1799066f29712e09d028bd41aafc677e (diff)
downloadmandoc-20511656c21f33d0727c770400e9597a87775aa2.tar.gz
mandoc-20511656c21f33d0727c770400e9597a87775aa2.tar.zst
mandoc-20511656c21f33d0727c770400e9597a87775aa2.zip
delete duplicate NULL check and polish style;
no functional change
Diffstat (limited to 'mandocdb.c')
-rw-r--r--mandocdb.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/mandocdb.c b/mandocdb.c
index 95d511f7..a9e280c5 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -1,4 +1,4 @@
-/* $Id: mandocdb.c,v 1.73 2013/10/18 23:07:23 schwarze Exp $ */
+/* $Id: mandocdb.c,v 1.74 2013/10/27 16:09:44 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011, 2012, 2013 Ingo Schwarze <schwarze@openbsd.org>
@@ -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);