diff options
author | Jesper Juhl <jesper.juhl@gmail.com> | 2007-08-25 02:24:43 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-08-26 21:35:45 -0400 |
commit | c573f73ce95d7e421cb4b9928dd41ac9518fcccf (patch) | |
tree | a2883fb046aab1e4c9ed647e59e441c3a9d41da9 /drivers/net/bsd_comp.c | |
parent | 901ded25fb98d76e55a8920834b173e7efc026b6 (diff) |
[NET]: Avoid pointless allocation casts in BSD compression module
The general kernel memory allocation functions return void pointers
and there is no need to cast their return values.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bsd_comp.c')
-rw-r--r-- | drivers/net/bsd_comp.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/bsd_comp.c b/drivers/net/bsd_comp.c index 202d4a4ef751..88edb986691a 100644 --- a/drivers/net/bsd_comp.c +++ b/drivers/net/bsd_comp.c | |||
@@ -406,8 +406,7 @@ static void *bsd_alloc (unsigned char *options, int opt_len, int decomp) | |||
406 | * Allocate space for the dictionary. This may be more than one page in | 406 | * Allocate space for the dictionary. This may be more than one page in |
407 | * length. | 407 | * length. |
408 | */ | 408 | */ |
409 | db->dict = (struct bsd_dict *) vmalloc (hsize * | 409 | db->dict = vmalloc(hsize * sizeof(struct bsd_dict)); |
410 | sizeof (struct bsd_dict)); | ||
411 | if (!db->dict) | 410 | if (!db->dict) |
412 | { | 411 | { |
413 | bsd_free (db); | 412 | bsd_free (db); |
@@ -426,8 +425,7 @@ static void *bsd_alloc (unsigned char *options, int opt_len, int decomp) | |||
426 | */ | 425 | */ |
427 | else | 426 | else |
428 | { | 427 | { |
429 | db->lens = (unsigned short *) vmalloc ((maxmaxcode + 1) * | 428 | db->lens = vmalloc((maxmaxcode + 1) * sizeof(db->lens[0])); |
430 | sizeof (db->lens[0])); | ||
431 | if (!db->lens) | 429 | if (!db->lens) |
432 | { | 430 | { |
433 | bsd_free (db); | 431 | bsd_free (db); |