diff options
author | deraadt <> | 2015-08-20 21:49:29 +0000 |
---|---|---|
committer | deraadt <> | 2015-08-20 21:49:29 +0000 |
commit | 6facd45e5fc7a4ce05f70781cc9fd4348a1b2938 (patch) | |
tree | 906afedfff26ac2d6fec9dd54aa21fad26af98bf /src/lib/libc/stdlib/tsearch.c | |
parent | 8701eea900ea0fccca890b571d44a8dbefbdc5a0 (diff) | |
download | openbsd-6facd45e5fc7a4ce05f70781cc9fd4348a1b2938.tar.gz openbsd-6facd45e5fc7a4ce05f70781cc9fd4348a1b2938.tar.bz2 openbsd-6facd45e5fc7a4ce05f70781cc9fd4348a1b2938.zip |
All these files include <stdlib.h>, so do not need to cast
malloc/calloc/realloc* returns.
Diffstat (limited to 'src/lib/libc/stdlib/tsearch.c')
-rw-r--r-- | src/lib/libc/stdlib/tsearch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libc/stdlib/tsearch.c b/src/lib/libc/stdlib/tsearch.c index a141085d2b..6a525e8bf0 100644 --- a/src/lib/libc/stdlib/tsearch.c +++ b/src/lib/libc/stdlib/tsearch.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tsearch.c,v 1.8 2014/03/16 18:38:30 guenther Exp $ */ | 1 | /* $OpenBSD: tsearch.c,v 1.9 2015/08/20 21:49:29 deraadt Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Tree search generalized from Knuth (6.2.2) Algorithm T just like | 4 | * Tree search generalized from Knuth (6.2.2) Algorithm T just like |
@@ -40,7 +40,7 @@ tsearch(const void *vkey, void **vrootp, | |||
40 | &(*rootp)->left : /* T3: follow left branch */ | 40 | &(*rootp)->left : /* T3: follow left branch */ |
41 | &(*rootp)->right; /* T4: follow right branch */ | 41 | &(*rootp)->right; /* T4: follow right branch */ |
42 | } | 42 | } |
43 | q = (node *) malloc(sizeof(node)); /* T5: key not found */ | 43 | q = malloc(sizeof(node)); /* T5: key not found */ |
44 | if (q != (struct node_t *)0) { /* make new node */ | 44 | if (q != (struct node_t *)0) { /* make new node */ |
45 | *rootp = q; /* link new node to old */ | 45 | *rootp = q; /* link new node to old */ |
46 | q->key = key; /* initialize new node */ | 46 | q->key = key; /* initialize new node */ |