]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
tsearch.3: Do not use const arguments in twalk() callback
authorFlorian Weimer <fweimer@redhat.com>
Fri, 3 May 2019 09:49:21 +0000 (11:49 +0200)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Sun, 5 May 2019 23:24:35 +0000 (18:24 -0500)
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>
man3/tsearch.3

index 2c4aa52024e26266a5fab40b28e28fbcfbead879..494c7839fe40c9bd19beb489efecbe992e975e78 100644 (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;