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