From b9ac7e789aa2c1bf358e1d967a0b87ef2322744b Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Fri, 30 Oct 2009 18:53:08 +0000 Subject: More lint fixes. Removed err.h from inclusions (less main.c--still in progress). --- html.c | 3 +-- man_html.c | 3 +-- man_term.c | 3 +-- mdoc_html.c | 9 +++++---- mdoc_term.c | 3 +-- term.c | 9 +++++---- tree.c | 3 +-- 7 files changed, 15 insertions(+), 18 deletions(-) diff --git a/html.c b/html.c index 8626e91e..f096720f 100644 --- a/html.c +++ b/html.c @@ -1,4 +1,4 @@ -/* $Id: html.c,v 1.73 2009/10/30 18:50:11 kristaps Exp $ */ +/* $Id: html.c,v 1.74 2009/10/30 18:53:08 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -18,7 +18,6 @@ #include #include -#include #include #include #include diff --git a/man_html.c b/man_html.c index 8402ec37..82b01d95 100644 --- a/man_html.c +++ b/man_html.c @@ -1,4 +1,4 @@ -/* $Id: man_html.c,v 1.16 2009/10/28 08:00:18 kristaps Exp $ */ +/* $Id: man_html.c,v 1.17 2009/10/30 18:53:08 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -18,7 +18,6 @@ #include #include -#include #include #include #include diff --git a/man_term.c b/man_term.c index d2ea4161..fd3f4264 100644 --- a/man_term.c +++ b/man_term.c @@ -1,4 +1,4 @@ -/* $Id: man_term.c,v 1.46 2009/10/27 08:49:44 kristaps Exp $ */ +/* $Id: man_term.c,v 1.47 2009/10/30 18:53:08 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -18,7 +18,6 @@ #include #include -#include #include #include #include diff --git a/mdoc_html.c b/mdoc_html.c index 5a314fa1..186d9a5d 100644 --- a/mdoc_html.c +++ b/mdoc_html.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_html.c,v 1.42 2009/10/28 08:00:18 kristaps Exp $ */ +/* $Id: mdoc_html.c,v 1.43 2009/10/30 18:53:08 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -19,7 +19,6 @@ #include #include -#include #include #include #include @@ -1115,8 +1114,10 @@ mdoc_bl_pre(MDOC_ARGS) return(1); ord = malloc(sizeof(struct ord)); - if (NULL == ord) - err(EXIT_FAILURE, "malloc"); + if (NULL == ord) { + fprintf(stderr, "memory exhausted\n"); + exit(EXIT_FAILURE); + } ord->cookie = n; ord->pos = 1; ord->next = h->ords.head; diff --git a/mdoc_term.c b/mdoc_term.c index 8d337150..1e47dc62 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.98 2009/10/27 08:49:44 kristaps Exp $ */ +/* $Id: mdoc_term.c,v 1.99 2009/10/30 18:53:09 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -18,7 +18,6 @@ #include #include -#include #include #include #include diff --git a/term.c b/term.c index 981c8bbe..b9ee9e4c 100644 --- a/term.c +++ b/term.c @@ -1,4 +1,4 @@ -/* $Id: term.c,v 1.118 2009/10/30 18:50:11 kristaps Exp $ */ +/* $Id: term.c,v 1.119 2009/10/30 18:53:09 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -15,7 +15,6 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include -#include #include #include #include @@ -147,9 +146,11 @@ term_flushln(struct termp *p) assert(p->offset < p->rmargin); maxvis = (int)(p->rmargin - p->offset) - overstep < 0 ? - 0 : p->rmargin - p->offset - overstep; + /* LINTED */ + 0 : p->rmargin - p->offset - overstep; mmax = (int)(p->maxrmargin - p->offset) - overstep < 0 ? - 0 : p->maxrmargin - p->offset - overstep; + /* LINTED */ + 0 : p->maxrmargin - p->offset - overstep; bp = TERMP_NOBREAK & p->flags ? mmax : maxvis; diff --git a/tree.c b/tree.c index 4220ba7d..24b19198 100644 --- a/tree.c +++ b/tree.c @@ -1,4 +1,4 @@ -/* $Id: tree.c,v 1.17 2009/10/26 17:05:44 kristaps Exp $ */ +/* $Id: tree.c,v 1.18 2009/10/30 18:53:09 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -15,7 +15,6 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include -#include #include #include #include -- cgit v1.2.3-56-ge451