From b592b1fad090579dfdb5cb6c1acdb8fcdc987c61 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Wed, 5 Jun 2013 21:21:08 +0000 Subject: The return value from parse_man() is completely unused, so make the function void; no functional change. --- mandocdb.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'mandocdb.c') diff --git a/mandocdb.c b/mandocdb.c index 719a0874..39f92539 100644 --- a/mandocdb.c +++ b/mandocdb.c @@ -1,4 +1,4 @@ -/* $Id: mandocdb.c,v 1.60 2013/06/05 20:27:11 schwarze Exp $ */ +/* $Id: mandocdb.c,v 1.61 2013/06/05 21:21:08 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2011, 2012, 2013 Ingo Schwarze @@ -140,8 +140,7 @@ static void ofadd(int, const char *, const char *, const char *, static void offree(void); static void ofmerge(struct mchars *, struct mparse *); static void parse_catpage(struct of *); -static int parse_man(struct of *, - const struct man_node *); +static void parse_man(struct of *, const struct man_node *); static void parse_mdoc(struct of *, const struct mdoc_node *); static int parse_mdoc_body(struct of *, const struct mdoc_node *); static int parse_mdoc_head(struct of *, const struct mdoc_node *); @@ -1181,7 +1180,7 @@ putmdockey(const struct of *of, const struct mdoc_node *n, uint64_t m) } } -static int +static void parse_man(struct of *of, const struct man_node *n) { const struct man_node *head, *body; @@ -1190,7 +1189,7 @@ parse_man(struct of *of, const struct man_node *n) size_t sz, titlesz; if (NULL == n) - return(0); + return; /* * We're only searching for one thing: the first text child in @@ -1232,7 +1231,7 @@ parse_man(struct of *of, const struct man_node *n) title[titlesz - 1] = ' '; } if (NULL == title) - return(1); + return; title = mandoc_realloc(title, titlesz + 1); title[titlesz] = '\0'; @@ -1245,7 +1244,7 @@ parse_man(struct of *of, const struct man_node *n) if (0 == (sz = strlen(sv))) { free(title); - return(1); + return; } /* Erase trailing space. */ @@ -1256,7 +1255,7 @@ parse_man(struct of *of, const struct man_node *n) if (start == sv) { free(title); - return(1); + return; } start = sv; @@ -1293,7 +1292,7 @@ parse_man(struct of *of, const struct man_node *n) if (sv == start) { putkey(of, start, TYPE_Nm); free(title); - return(1); + return; } while (isspace((unsigned char)*start)) @@ -1317,15 +1316,12 @@ parse_man(struct of *of, const struct man_node *n) of->desc = stradd(start); putkey(of, start, TYPE_Nd); free(title); - return(1); + return; } } for (n = n->child; n; n = n->next) - if (parse_man(of, n)) - return(1); - - return(0); + parse_man(of, n); } static void -- cgit v1.2.3-56-ge451