aboutsummaryrefslogtreecommitdiffstats
path: root/man3
diff options
context:
space:
mode:
authorAlejandro Colomar <colomar.6.4.3@gmail.com>2020-09-05 17:40:44 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2020-09-05 17:40:44 +0200
commitc7e5aa83d27fa8fb189074e63d32bf97a4e970a6 (patch)
tree338610882fccc7b4c7bb6271c9d752997737b5d3 /man3
parent69003a58910f233a99be0736b22bd05cc751167a (diff)
downloadman-pages-c7e5aa83d27fa8fb189074e63d32bf97a4e970a6.tar.gz
tsearch.3: Remove unneeded cast
Casting `int *` to `const void *` is already done implicitly. Not only that, but the explicit cast to `void *` was slightly misleading. Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man3')
-rw-r--r--man3/tsearch.32
1 files changed, 1 insertions, 1 deletions
diff --git a/man3/tsearch.3 b/man3/tsearch.3
index 2e84031304..94209d2a26 100644
--- a/man3/tsearch.3
+++ b/man3/tsearch.3
@@ -329,7 +329,7 @@ main(void)
for (int i = 0; i < 12; i++) {
int *ptr = xmalloc(sizeof(*ptr));
*ptr = rand() & 0xff;
- val = tsearch((void *) ptr, &root, compare);
+ val = tsearch(ptr, &root, compare);
if (val == NULL)
exit(EXIT_FAILURE);
else if ((*(int **) val) != ptr)