mirror of
https://github.com/opnsense/src.git
synced 2026-04-27 09:06:49 -04:00
Use uint32_t for LBC block size.
LBC block size can only be up to 4GB. The existing code already clamps it, but mixes unsigned long and uint32_t. This works on 32-bit targets, but not 64-bit, so isn't completely correct. This fixes the type confusion.
This commit is contained in:
parent
9ed9d9bc3c
commit
295be3307c
1 changed files with 3 additions and 3 deletions
|
|
@ -126,11 +126,11 @@ lbc_address_mask(uint32_t size)
|
|||
{
|
||||
int n = 15;
|
||||
|
||||
if (size == ~0UL)
|
||||
if (size == ~0)
|
||||
return (0);
|
||||
|
||||
while (n < 32) {
|
||||
if (size == (1UL << n))
|
||||
if (size == (1U << n))
|
||||
break;
|
||||
n++;
|
||||
}
|
||||
|
|
@ -267,7 +267,7 @@ lbc_banks_map(struct lbc_softc *sc)
|
|||
static int
|
||||
lbc_banks_enable(struct lbc_softc *sc)
|
||||
{
|
||||
u_long size;
|
||||
uint32_t size;
|
||||
uint32_t regval;
|
||||
int error, i;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue