From c0828478b0ed14413688bccc1e4c3fca5db7817d Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Thu, 11 Mar 2021 23:33:15 +0100 Subject: [PATCH] tsearch.3: SYNOPSIS: Use 'restrict' in prototypes Both POSIX and glibc use 'restrict' in tdelete(). Let's use it here too. .../glibc$ grep_glibc_prototype tdelete misc/search.h:138: extern void *tdelete (const void *__restrict __key, void **__restrict __rootp, __compar_fn_t __compar); .../glibc$ Signed-off-by: Alejandro Colomar Signed-off-by: Michael Kerrisk --- man3/tsearch.3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man3/tsearch.3 b/man3/tsearch.3 index 1c771ef4a..ab4a2b767 100644 --- a/man3/tsearch.3 +++ b/man3/tsearch.3 @@ -35,11 +35,11 @@ tsearch, tfind, tdelete, twalk, tdestroy \- manage a binary search tree .BI " int (*" compar ")(const void *, const void *));" .BI "void *tfind(const void *" key ", void *const *" rootp , .BI " int (*" compar ")(const void *, const void *));" -.BI "void *tdelete(const void *" key ", void **" rootp , +.BI "void *tdelete(const void *restrict " key ", void **restrict " rootp , .BI " int (*" compar ")(const void *, const void *));" .BI "void twalk(const void *" root , .BI " void (*" action ")(const void *" nodep ", VISIT " which , -.BI " int " depth "));" +.BI " int " depth )); .PP .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include