summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-10-06 18:32:19 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-10-06 18:32:19 +0000
commitcdd9965f2080354017315270cbc3dc2da6378df9 (patch)
treeabceb46c894355584ad94178001ebb10ff35db04 /main.c
parent2c5e2d1085930e82ce52bf9402182a0630e8f39d (diff)
downloadmandoc-cdd9965f2080354017315270cbc3dc2da6378df9.tar.gz
modernize style: "return" is not a function
Diffstat (limited to 'main.c')
-rw-r--r--main.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/main.c b/main.c
index 20078ba1..a1eca5e7 100644
--- a/main.c
+++ b/main.c
@@ -148,7 +148,7 @@ main(int argc, char *argv[])
#if HAVE_SQLITE3
if (strcmp(progname, BINM_MAKEWHATIS) == 0)
- return(mandocdb(argc, argv));
+ return mandocdb(argc, argv);
#endif
/* Search options. */
@@ -210,13 +210,13 @@ main(int argc, char *argv[])
fprintf(stderr,
"%s: -I %s: Bad argument\n",
progname, optarg);
- return((int)MANDOCLEVEL_BADARG);
+ return (int)MANDOCLEVEL_BADARG;
}
if (defos) {
fprintf(stderr,
"%s: -I %s: Duplicate argument\n",
progname, optarg);
- return((int)MANDOCLEVEL_BADARG);
+ return (int)MANDOCLEVEL_BADARG;
}
defos = mandoc_strdup(optarg + 3);
break;
@@ -225,7 +225,7 @@ main(int argc, char *argv[])
break;
case 'K':
if ( ! koptions(&options, optarg))
- return((int)MANDOCLEVEL_BADARG);
+ return (int)MANDOCLEVEL_BADARG;
break;
case 'k':
search.argmode = ARG_EXPR;
@@ -254,11 +254,11 @@ main(int argc, char *argv[])
break;
case 'T':
if ( ! toptions(&curp, optarg))
- return((int)MANDOCLEVEL_BADARG);
+ return (int)MANDOCLEVEL_BADARG;
break;
case 'W':
if ( ! woptions(&curp, optarg))
- return((int)MANDOCLEVEL_BADARG);
+ return (int)MANDOCLEVEL_BADARG;
break;
case 'w':
outmode = OUTMODE_FLN;
@@ -349,7 +349,7 @@ main(int argc, char *argv[])
if (search.argmode != ARG_NAME) {
fputs("mandoc: database support not compiled in\n",
stderr);
- return((int)MANDOCLEVEL_BADARG);
+ return (int)MANDOCLEVEL_BADARG;
}
sz = 0;
#endif
@@ -418,7 +418,7 @@ main(int argc, char *argv[])
/* mandoc(1) */
if (search.argmode == ARG_FILE && ! moptions(&options, auxpaths))
- return((int)MANDOCLEVEL_BADARG);
+ return (int)MANDOCLEVEL_BADARG;
if (use_pager && ! isatty(STDOUT_FILENO))
use_pager = 0;
@@ -504,7 +504,7 @@ out:
tag_unlink();
}
- return((int)rc);
+ return (int)rc;
}
static void
@@ -582,7 +582,7 @@ fs_lookup(const struct manpaths *paths, size_t ipath,
file = mandoc_strdup(*globinfo.gl_pathv);
globfree(&globinfo);
if (globres != 0)
- return(0);
+ return 0;
found:
#if HAVE_SQLITE3
@@ -598,7 +598,7 @@ found:
page->bits = NAME_FILE & NAME_MASK;
page->sec = (*sec >= '1' && *sec <= '9') ? *sec - '1' + 1 : 10;
page->form = form;
- return(1);
+ return 1;
}
static void
@@ -823,9 +823,9 @@ koptions(int *options, char *arg)
} else {
fprintf(stderr, "%s: -K %s: Bad argument\n",
progname, arg);
- return(0);
+ return 0;
}
- return(1);
+ return 1;
}
static int
@@ -843,10 +843,10 @@ moptions(int *options, char *arg)
else {
fprintf(stderr, "%s: -m %s: Bad argument\n",
progname, arg);
- return(0);
+ return 0;
}
- return(1);
+ return 1;
}
static int
@@ -877,10 +877,10 @@ toptions(struct curparse *curp, char *arg)
else {
fprintf(stderr, "%s: -T %s: Bad argument\n",
progname, arg);
- return(0);
+ return 0;
}
- return(1);
+ return 1;
}
static int
@@ -920,11 +920,11 @@ woptions(struct curparse *curp, char *arg)
default:
fprintf(stderr, "%s: -W %s: Bad argument\n",
progname, o);
- return(0);
+ return 0;
}
}
- return(1);
+ return 1;
}
static void
@@ -1005,7 +1005,7 @@ spawn_pager(struct tag_files *tag_files)
case 0:
break;
default:
- return(pager_pid);
+ return pager_pid;
}
/* The child process becomes the pager. */