diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-12-22 18:37:07 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-12-22 18:37:07 +0000 |
commit | 4cccc03768ecde58e8acd5e4f40e51227e3c14cc (patch) | |
tree | 1d9ac9a483f4ca245fff9925c30a7f842d9b51ca /editors/awk.c | |
parent | a6df5907d273f0fe067e82c60391d6bf9a02dd4b (diff) | |
download | busybox-w32-4cccc03768ecde58e8acd5e4f40e51227e3c14cc.tar.gz busybox-w32-4cccc03768ecde58e8acd5e4f40e51227e3c14cc.tar.bz2 busybox-w32-4cccc03768ecde58e8acd5e4f40e51227e3c14cc.zip |
remove useless casts (type*) xzalloc(...)
Diffstat (limited to 'editors/awk.c')
-rw-r--r-- | editors/awk.c | 13 |
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) | |||
469 | { | 469 | { |
470 | xhash *newhash; | 470 | xhash *newhash; |
471 | 471 | ||
472 | newhash = (xhash *)xzalloc(sizeof(xhash)); | 472 | newhash = xzalloc(sizeof(xhash)); |
473 | newhash->csize = FIRST_PRIME; | 473 | newhash->csize = FIRST_PRIME; |
474 | newhash->items = (hash_item **)xzalloc(newhash->csize * sizeof(hash_item *)); | 474 | newhash->items = xzalloc(newhash->csize * sizeof(hash_item *)); |
475 | 475 | ||
476 | return newhash; | 476 | return newhash; |
477 | } | 477 | } |
@@ -500,7 +500,7 @@ static void hash_rebuild(xhash *hash) | |||
500 | return; | 500 | return; |
501 | 501 | ||
502 | newsize = PRIMES[hash->nprime++]; | 502 | newsize = PRIMES[hash->nprime++]; |
503 | newitems = (hash_item **)xzalloc(newsize * sizeof(hash_item *)); | 503 | newitems = xzalloc(newsize * sizeof(hash_item *)); |
504 | 504 | ||
505 | for (i=0; i<hash->csize; i++) { | 505 | for (i=0; i<hash->csize; i++) { |
506 | hi = hash->items[i]; | 506 | hi = hash->items[i]; |
@@ -988,7 +988,7 @@ static node *new_node(uint32_t info) | |||
988 | { | 988 | { |
989 | node *n; | 989 | node *n; |
990 | 990 | ||
991 | n = (node *)xzalloc(sizeof(node)); | 991 | n = xzalloc(sizeof(node)); |
992 | n->info = info; | 992 | n->info = info; |
993 | n->lineno = lineno; | 993 | n->lineno = lineno; |
994 | return n; | 994 | return n; |
@@ -1098,8 +1098,7 @@ static node *parse_expr(uint32_t iexp) | |||
1098 | break; | 1098 | break; |
1099 | 1099 | ||
1100 | case TC_REGEXP: | 1100 | case TC_REGEXP: |
1101 | mk_re_node(t.string, cn, | 1101 | mk_re_node(t.string, cn, xzalloc(sizeof(regex_t)*2)); |
1102 | (regex_t *)xzalloc(sizeof(regex_t)*2)); | ||
1103 | break; | 1102 | break; |
1104 | 1103 | ||
1105 | case TC_FUNCTION: | 1104 | case TC_FUNCTION: |
@@ -1585,7 +1584,7 @@ static void hashwalk_init(var *v, xhash *array) | |||
1585 | free(v->x.walker); | 1584 | free(v->x.walker); |
1586 | 1585 | ||
1587 | v->type |= VF_WALK; | 1586 | v->type |= VF_WALK; |
1588 | w = v->x.walker = (char **)xzalloc(2 + 2*sizeof(char *) + array->glen); | 1587 | w = v->x.walker = xzalloc(2 + 2*sizeof(char *) + array->glen); |
1589 | *w = *(w+1) = (char *)(w + 2); | 1588 | *w = *(w+1) = (char *)(w + 2); |
1590 | for (i=0; i<array->csize; i++) { | 1589 | for (i=0; i<array->csize; i++) { |
1591 | hi = array->items[i]; | 1590 | hi = array->items[i]; |