summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-03-21 09:48:29 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-03-21 09:48:29 +0000
commitc8944e5d64b28710e7e92727329e152bd5ebd69a (patch)
tree23f15f7f817f2f72d138702aa676693ee5e87d2f
parent4a24c0549dabccbcc26a491241faad6261ef7d86 (diff)
downloadmandoc-c8944e5d64b28710e7e92727329e152bd5ebd69a.tar.gz
mandoc-c8944e5d64b28710e7e92727329e152bd5ebd69a.tar.zst
mandoc-c8944e5d64b28710e7e92727329e152bd5ebd69a.zip
Lint fixes.
-rw-r--r--action.c11
-rw-r--r--term.h4
-rw-r--r--validate.c5
3 files changed, 12 insertions, 8 deletions
diff --git a/action.c b/action.c
index a1a99e20..0caac70c 100644
--- a/action.c
+++ b/action.c
@@ -1,4 +1,4 @@
-/* $Id: action.c,v 1.47 2009/03/21 09:42:07 kristaps Exp $ */
+/* $Id: action.c,v 1.48 2009/03/21 09:48:29 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@openbsd.org>
*
@@ -405,7 +405,8 @@ post_dt(POST_ARGS)
* arch = NULL
*/
- if ((cp = mdoc_a2msec(n->string))) {
+ cp = mdoc_a2msec(n->string);
+ if (cp) {
m->meta.vol = xstrdup(cp);
errno = 0;
lval = strtol(n->string, &ep, 10);
@@ -424,7 +425,8 @@ post_dt(POST_ARGS)
* VOL
*/
- if ((cp = mdoc_a2vol(n->string))) {
+ cp = mdoc_a2vol(n->string);
+ if (cp) {
free(m->meta.vol);
m->meta.vol = xstrdup(cp);
n = n->next;
@@ -489,7 +491,8 @@ post_bl_tagwidth(struct mdoc *m)
* width if a macro.
*/
- if ((n = n->head->child)) {
+ n = n->head->child;
+ if (n) {
if (MDOC_TEXT != n->type) {
if (0 == (sz = (int)mdoc_macro2len(n->tok)))
sz = -1;
diff --git a/term.h b/term.h
index 14e7483b..9a9be595 100644
--- a/term.h
+++ b/term.h
@@ -1,4 +1,4 @@
-/* $Id: term.h,v 1.29 2009/03/20 15:14:01 kristaps Exp $ */
+/* $Id: term.h,v 1.30 2009/03/21 09:48:30 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -73,7 +73,7 @@ struct termpair {
(termp)->flags |= (fl); \
(p)->flag = (fl); \
(p)->type |= TERMPAIR_FLAG; \
- } while (0)
+ } while ( /* CONSTCOND */ 0)
struct termact {
int (*pre)(struct termp *, struct termpair *,
diff --git a/validate.c b/validate.c
index baeee06a..8690c58c 100644
--- a/validate.c
+++ b/validate.c
@@ -1,4 +1,4 @@
-/* $Id: validate.c,v 1.87 2009/03/21 09:42:07 kristaps Exp $ */
+/* $Id: validate.c,v 1.88 2009/03/21 09:48:30 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@openbsd.org>
*
@@ -707,7 +707,8 @@ check_text(struct mdoc *mdoc, int line, int pos, const char *p)
if ('\\' != *p)
continue;
- if ((c = mdoc_isescape(p))) {
+ c = mdoc_isescape(p);
+ if (c) {
p += (int)c - 1;
continue;
}