aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-12-22 18:37:07 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-12-22 18:37:07 +0000
commit4cccc03768ecde58e8acd5e4f40e51227e3c14cc (patch)
tree1d9ac9a483f4ca245fff9925c30a7f842d9b51ca /editors
parenta6df5907d273f0fe067e82c60391d6bf9a02dd4b (diff)
downloadbusybox-4cccc03768ecde58e8acd5e4f40e51227e3c14cc.tar.gz
remove useless casts (type*) xzalloc(...)
Diffstat (limited to 'editors')
-rw-r--r--editors/awk.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/editors/awk.c b/editors/awk.c
index 81ca9daf7..2fea55113 100644
--- a/editors/awk.c
+++ b/editors/awk.c
@@ -469,9 +469,9 @@ static xhash *hash_init(void)
{
xhash *newhash;
- newhash = (xhash *)xzalloc(sizeof(xhash));
+ newhash = xzalloc(sizeof(xhash));
newhash->csize = FIRST_PRIME;
- newhash->items = (hash_item **)xzalloc(newhash->csize * sizeof(hash_item *));
+ newhash->items = xzalloc(newhash->csize * sizeof(hash_item *));
return newhash;
}
@@ -500,7 +500,7 @@ static void hash_rebuild(xhash *hash)
return;
newsize = PRIMES[hash->nprime++];
- newitems = (hash_item **)xzalloc(newsize * sizeof(hash_item *));
+ newitems = xzalloc(newsize * sizeof(hash_item *));
for (i=0; i<hash->csize; i++) {
hi = hash->items[i];
@@ -988,7 +988,7 @@ static node *new_node(uint32_t info)
{
node *n;
- n = (node *)xzalloc(sizeof(node));
+ n = xzalloc(sizeof(node));
n->info = info;
n->lineno = lineno;
return n;
@@ -1098,8 +1098,7 @@ static node *parse_expr(uint32_t iexp)
break;
case TC_REGEXP:
- mk_re_node(t.string, cn,
- (regex_t *)xzalloc(sizeof(regex_t)*2));
+ mk_re_node(t.string, cn, xzalloc(sizeof(regex_t)*2));
break;
case TC_FUNCTION:
@@ -1585,7 +1584,7 @@ static void hashwalk_init(var *v, xhash *array)
free(v->x.walker);
v->type |= VF_WALK;
- w = v->x.walker = (char **)xzalloc(2 + 2*sizeof(char *) + array->glen);
+ w = v->x.walker = xzalloc(2 + 2*sizeof(char *) + array->glen);
*w = *(w+1) = (char *)(w + 2);
for (i=0; i<array->csize; i++) {
hi = array->items[i];