diff options
author | des <des@FreeBSD.org> | 2009-06-13 13:07:56 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2009-06-13 13:07:56 +0000 |
commit | feee7c0482f0d8cc0f167db30f14db19552cfb66 (patch) | |
tree | 938166a168a8b3b655695f86589862545145f186 /usr.sbin/nscd/cacheplcs.c | |
parent | 51194019fc09872f7a745dffc7f000c58a8de5d1 (diff) | |
download | FreeBSD-src-feee7c0482f0d8cc0f167db30f14db19552cfb66.zip FreeBSD-src-feee7c0482f0d8cc0f167db30f14db19552cfb66.tar.gz |
Remove casts from {c,m,re}alloc() and simplify sizeof().
MFC after: 1 week
Diffstat (limited to 'usr.sbin/nscd/cacheplcs.c')
-rw-r--r-- | usr.sbin/nscd/cacheplcs.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/usr.sbin/nscd/cacheplcs.c b/usr.sbin/nscd/cacheplcs.c index 6f45b5a..37cf765 100644 --- a/usr.sbin/nscd/cacheplcs.c +++ b/usr.sbin/nscd/cacheplcs.c @@ -86,8 +86,8 @@ cache_queue_policy_create_item(void) struct cache_queue_policy_item_ *retval; TRACE_IN(cache_queue_policy_create_item); - retval = (struct cache_queue_policy_item_ *)calloc(1, - sizeof(struct cache_queue_policy_item_)); + retval = calloc(1, + sizeof(*retval)); assert(retval != NULL); TRACE_OUT(cache_queue_policy_create_item); @@ -196,8 +196,8 @@ init_cache_queue_policy(void) struct cache_queue_policy_ *retval; TRACE_IN(init_cache_queue_policy); - retval = (struct cache_queue_policy_ *)calloc(1, - sizeof(struct cache_queue_policy_)); + retval = calloc(1, + sizeof(*retval)); assert(retval != NULL); retval->parent_data.create_item_func = cache_queue_policy_create_item; @@ -336,8 +336,8 @@ cache_lfu_policy_create_item(void) struct cache_lfu_policy_item_ *retval; TRACE_IN(cache_lfu_policy_create_item); - retval = (struct cache_lfu_policy_item_ *)calloc(1, - sizeof(struct cache_lfu_policy_item_)); + retval = calloc(1, + sizeof(*retval)); assert(retval != NULL); TRACE_OUT(cache_lfu_policy_create_item); @@ -540,8 +540,8 @@ init_cache_lfu_policy(void) struct cache_lfu_policy_ *retval; TRACE_IN(init_cache_lfu_policy); - retval = (struct cache_lfu_policy_ *)calloc(1, - sizeof(struct cache_lfu_policy_)); + retval = calloc(1, + sizeof(*retval)); assert(retval != NULL); retval->parent_data.create_item_func = cache_lfu_policy_create_item; |