summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--action.c9
-rw-r--r--term.h2
-rw-r--r--validate.c3
3 files changed, 9 insertions, 5 deletions
diff --git a/action.c b/action.c
index 73cecd0d..65567d51 100644
--- a/action.c
+++ b/action.c
@@ -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 461d801b..2dc9ef00 100644
--- a/term.h
+++ b/term.h
@@ -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 7d2c0d05..65785042 100644
--- a/validate.c
+++ b/validate.c
@@ -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;
}