diff options
-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); |