aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2010-01-24 12:35:36 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2010-01-24 12:35:36 +0000
commitb3c4be736e48225b08b699ae9200e585441a8d5e (patch)
treec96ffe7ab80950945f7669f3be0d541f0c85f20d /usr.bin
parentbe6797dde88efc84055db6a0661ab512eeabe8a5 (diff)
Notes
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/catman/catman.c10
-rw-r--r--usr.bin/makewhatis/makewhatis.c4
2 files changed, 10 insertions, 4 deletions
diff --git a/usr.bin/catman/catman.c b/usr.bin/catman/catman.c
index ba3ad248a2c2..c17a091593cb 100644
--- a/usr.bin/catman/catman.c
+++ b/usr.bin/catman/catman.c
@@ -589,9 +589,15 @@ process_section(char *mandir, char *section)
}
static int
-select_sections(struct dirent *entry)
+select_sections(const struct dirent *entry)
{
- return directory_type(entry->d_name) == MAN_SECTION_DIR;
+ char *name;
+ int ret;
+
+ name = strdup(entry->d_name);
+ ret = directory_type(name) == MAN_SECTION_DIR;
+ free(name);
+ return (ret);
}
/*
diff --git a/usr.bin/makewhatis/makewhatis.c b/usr.bin/makewhatis/makewhatis.c
index 6b2dce4e5950..f2ae3709d6dd 100644
--- a/usr.bin/makewhatis/makewhatis.c
+++ b/usr.bin/makewhatis/makewhatis.c
@@ -879,9 +879,9 @@ process_section(char *section_dir)
* Returns whether the directory entry is a man page section.
*/
static int
-select_sections(struct dirent *entry)
+select_sections(const struct dirent *entry)
{
- char *p = &entry->d_name[3];
+ const char *p = &entry->d_name[3];
if (strncmp(entry->d_name, "man", 3) != 0)
return 0;