summaryrefslogtreecommitdiffstats
path: root/usr.bin/catman/catman.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/catman/catman.c')
-rw-r--r--usr.bin/catman/catman.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.bin/catman/catman.c b/usr.bin/catman/catman.c
index ba3ad24..c17a091 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);
}
/*
OpenPOWER on IntegriCloud