diff options
author | pfg <pfg@FreeBSD.org> | 2015-05-18 16:28:13 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2015-05-18 16:28:13 +0000 |
commit | bcef2ac230d45af84c285b23a775a60395f3e05d (patch) | |
tree | 78cf3e017ed6217ffd5b39e306f4a40eabd4546d /lib/libc/db | |
parent | 669babe7257682b58c1a03b62bb475f971f9a0d5 (diff) | |
download | FreeBSD-src-bcef2ac230d45af84c285b23a775a60395f3e05d.zip FreeBSD-src-bcef2ac230d45af84c285b23a775a60395f3e05d.tar.gz |
Drop some unnecessary casts.
Reported by: Clang static analyzer
Obtained from: NetBSD
Diffstat (limited to 'lib/libc/db')
-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 af80929..e6da5fe 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; |