From 924c4755ac64b780903344b188653f513990a771 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 8 Jan 2016 17:48:09 +0000 Subject: Delete the redundant "nchild" member of struct roff_node, replacing most uses by one, a few by two pointer checks, and only one by a tiny loop - not only making data smaller, but code shorter as well. This gets rid of an implicit invariant that confused both static analysis tools and human auditors. No functional change. --- man_macro.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'man_macro.c') diff --git a/man_macro.c b/man_macro.c index 52073410..d1533570 100644 --- a/man_macro.c +++ b/man_macro.c @@ -1,4 +1,4 @@ -/* $Id: man_macro.c,v 1.113 2015/10/22 21:54:23 schwarze Exp $ */ +/* $Id: man_macro.c,v 1.114 2016/01/08 17:48:09 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2012, 2013, 2014, 2015 Ingo Schwarze @@ -157,7 +157,7 @@ rew_scope(struct roff_man *man, int tok) /* Preserve empty paragraphs before RS. */ n = man->last; - if (tok == MAN_RS && n->nchild == 0 && + if (tok == MAN_RS && n->child == NULL && (n->tok == MAN_P || n->tok == MAN_PP || n->tok == MAN_LP)) return; -- cgit v1.2.3