[PATCH] tsearch: Do not use const arguments in twalk callback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The const specifier is not part of the prototype (it only applies to the
implementation), so showing it here confuses the reader.
---
 man3/tsearch.3 | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/man3/tsearch.3 b/man3/tsearch.3
index 33213a029..b64c9c6b7 100644
--- a/man3/tsearch.3
+++ b/man3/tsearch.3
@@ -39,8 +39,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>
@@ -271,7 +270,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;
 
-- 
2.20.1




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux