summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2013-05-29 23:15:12 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2013-05-29 23:15:12 +0000
commit313d6b9da3054fd8cd2be27c88ed5ecf249e97fb (patch)
treecdf1f3dfc1cb35804abe1ef4e33c020af6e03ca1 /usr.bin/mandoc
parentc75c734490a599a8d5dcbecb295894f1c6c3b29f (diff)
Trivial sync to bsd.lv:
Kristaps changed the size member of struct manpaths from int to size_t. No functional change.
Diffstat (limited to 'usr.bin/mandoc')
-rw-r--r--usr.bin/mandoc/mandocdb.c10
-rw-r--r--usr.bin/mandoc/manpath.c10
-rw-r--r--usr.bin/mandoc/manpath.h4
3 files changed, 12 insertions, 12 deletions
diff --git a/usr.bin/mandoc/mandocdb.c b/usr.bin/mandoc/mandocdb.c
index a67b82b2ee1..804691c9ef4 100644
--- a/usr.bin/mandoc/mandocdb.c
+++ b/usr.bin/mandoc/mandocdb.c
@@ -1,4 +1,4 @@
-/* $Id: mandocdb.c,v 1.42 2012/05/24 23:33:23 schwarze Exp $ */
+/* $Id: mandocdb.c,v 1.43 2013/05/29 23:15:11 schwarze Exp $ */
/*
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011 Ingo Schwarze <schwarze@openbsd.org>
@@ -286,7 +286,7 @@ mandocdb(int argc, char *argv[])
int ch, i, flags;
DB *hash; /* temporary keyword hashtable */
BTREEINFO info; /* btree configuration */
- size_t sz1, sz2;
+ size_t sz1, sz2, ipath;
struct buf buf, /* keyword buffer */
dbuf; /* description buffer */
struct of *of; /* list of files for processing */
@@ -469,7 +469,7 @@ mandocdb(int argc, char *argv[])
} else
manpath_parse(&dirs, dir, NULL, NULL);
- for (i = 0; i < dirs.sz; i++) {
+ for (ipath = 0; ipath < dirs.sz; ipath++) {
/*
* Go to the root of the respective manual tree.
@@ -477,8 +477,8 @@ mandocdb(int argc, char *argv[])
* They are indexed relative to the root.
*/
- if (-1 == chdir(dirs.paths[i])) {
- perror(dirs.paths[i]);
+ if (-1 == chdir(dirs.paths[ipath])) {
+ perror(dirs.paths[ipath]);
exit((int)MANDOCLEVEL_SYSERR);
}
diff --git a/usr.bin/mandoc/manpath.c b/usr.bin/mandoc/manpath.c
index 5dfdc681e22..a22c23e3113 100644
--- a/usr.bin/mandoc/manpath.c
+++ b/usr.bin/mandoc/manpath.c
@@ -1,4 +1,4 @@
-/* $Id: manpath.c,v 1.5 2012/12/04 02:24:47 deraadt Exp $ */
+/* $Id: manpath.c,v 1.6 2013/05/29 23:15:11 schwarze Exp $ */
/*
* Copyright (c) 2011 Ingo Schwarze <schwarze@openbsd.org>
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
@@ -66,7 +66,7 @@ manpath_parse(struct manpaths *dirs, const char *file,
}
/* Append man.conf(5) to MANPATH. */
- if (':' == defp[(int)strlen(defp) - 1]) {
+ if (':' == defp[strlen(defp) - 1]) {
manpath_parseline(dirs, defp);
manpath_manconf(dirs, file);
return;
@@ -110,7 +110,7 @@ manpath_add(struct manpaths *dirs, const char *dir)
{
char buf[PATH_MAX];
char *cp;
- int i;
+ size_t i;
if (NULL == (cp = realpath(dir, buf)))
return;
@@ -121,7 +121,7 @@ manpath_add(struct manpaths *dirs, const char *dir)
dirs->paths = mandoc_realloc
(dirs->paths,
- ((size_t)dirs->sz + 1) * sizeof(char *));
+ (dirs->sz + 1) * sizeof(char *));
dirs->paths[dirs->sz++] = mandoc_strdup(cp);
}
@@ -129,7 +129,7 @@ manpath_add(struct manpaths *dirs, const char *dir)
void
manpath_free(struct manpaths *p)
{
- int i;
+ size_t i;
for (i = 0; i < p->sz; i++)
free(p->paths[i]);
diff --git a/usr.bin/mandoc/manpath.h b/usr.bin/mandoc/manpath.h
index 4b2233d17a2..c2d3bb14bea 100644
--- a/usr.bin/mandoc/manpath.h
+++ b/usr.bin/mandoc/manpath.h
@@ -1,4 +1,4 @@
-/* $Id: manpath.h,v 1.3 2011/12/19 02:26:33 schwarze Exp $ */
+/* $Id: manpath.h,v 1.4 2013/05/29 23:15:11 schwarze Exp $ */
/*
* Copyright (c) 2011 Ingo Schwarze <schwarze@openbsd.org>
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
@@ -23,7 +23,7 @@
* databases.
*/
struct manpaths {
- int sz;
+ size_t sz;
char **paths;
};