diff options
author | Pedro F. Giffuni <pfg@FreeBSD.org> | 2015-05-18 16:28:13 +0000 |
---|---|---|
committer | Pedro F. Giffuni <pfg@FreeBSD.org> | 2015-05-18 16:28:13 +0000 |
commit | 1b81d865259bb7f60f4269ff52d94968e6ba0f5b (patch) | |
tree | 78cf3e017ed6217ffd5b39e306f4a40eabd4546d /lib | |
parent | 2624de5c5654ac9461a951adcf54dca5f6cf00cc (diff) | |
download | src-1b81d865259bb7f60f4269ff52d94968e6ba0f5b.tar.gz src-1b81d865259bb7f60f4269ff52d94968e6ba0f5b.zip |
Drop some unnecessary casts.
Reported by: Clang static analyzer
Obtained from: NetBSD
Notes
Notes:
svn path=/head/; revision=283068
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/db/hash/hash.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/libc/db/hash/hash.c b/lib/libc/db/hash/hash.c index af80929112b0..e6da5fea4786 100644 --- a/lib/libc/db/hash/hash.c +++ b/lib/libc/db/hash/hash.c @@ -808,7 +808,7 @@ __expand_table(HTAB *hashp) hashp->DSIZE = dirsize << 1; } if ((hashp->dir[new_segnum] = - (SEGMENT)calloc(hashp->SGSIZE, sizeof(SEGMENT))) == NULL) + calloc(hashp->SGSIZE, sizeof(SEGMENT))) == NULL) return (-1); hashp->exsegs++; hashp->nsegs++; @@ -877,7 +877,7 @@ alloc_segs(HTAB *hashp, int nsegs) int save_errno; if ((hashp->dir = - (SEGMENT *)calloc(hashp->DSIZE, sizeof(SEGMENT *))) == NULL) { + calloc(hashp->DSIZE, sizeof(SEGMENT *))) == NULL) { save_errno = errno; (void)hdestroy(hashp); errno = save_errno; @@ -887,8 +887,7 @@ alloc_segs(HTAB *hashp, int nsegs) if (nsegs == 0) return (0); /* Allocate segments */ - if ((store = (SEGMENT)calloc(nsegs << hashp->SSHIFT, - sizeof(SEGMENT))) == NULL) { + if ((store = calloc(nsegs << hashp->SSHIFT, sizeof(SEGMENT))) == NULL) { save_errno = errno; (void)hdestroy(hashp); errno = save_errno; |