tsearch.3: Do not use const arguments in twalk() callback

The const specifier is not part of the prototype (it only applies to the
implementation), so showing it here confuses the reader.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Florian Weimer 2019-05-03 11:49:21 +02:00 committed by Michael Kerrisk
parent 14a848f0f1
commit 06eef09b9c
1 changed files with 2 additions and 3 deletions

View File

@ -41,8 +41,7 @@ tsearch, tfind, tdelete, twalk, tdestroy \- manage a binary search tree
.BI " int (*" compar ")(const void *, const void *));"
.PP
.BI "void twalk(const void *" root ", void (*" action ")(const void *" nodep ,
.BI " const VISIT " which ,
.BI " const int " depth "));"
.BI " VISIT " which ", int " depth "));"
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
.B #include <search.h>
@ -273,7 +272,7 @@ compare(const void *pa, const void *pb)
}
static void
action(const void *nodep, const VISIT which, const int depth)
action(const void *nodep, VISIT which, int depth)
{
int *datap;