Skip to content

Commit

Permalink
[NET]: Avoid pointless allocation casts in BSD compression module
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jesper Juhl authored and David S. Miller committed Aug 27, 2007
1 parent 901ded2 commit c573f73
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/net/bsd_comp.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,8 +406,7 @@ static void *bsd_alloc (unsigned char *options, int opt_len, int decomp)
* Allocate space for the dictionary. This may be more than one page in
* length.
*/
db->dict = (struct bsd_dict *) vmalloc (hsize *
sizeof (struct bsd_dict));
db->dict = vmalloc(hsize * sizeof(struct bsd_dict));
if (!db->dict)
{
bsd_free (db);
Expand All @@ -426,8 +425,7 @@ static void *bsd_alloc (unsigned char *options, int opt_len, int decomp)
*/
else
{
db->lens = (unsigned short *) vmalloc ((maxmaxcode + 1) *
sizeof (db->lens[0]));
db->lens = vmalloc((maxmaxcode + 1) * sizeof(db->lens[0]));
if (!db->lens)
{
bsd_free (db);
Expand Down

0 comments on commit c573f73

Please sign in to comment.