mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
Prevent an error resulting from signed/unsigned comparison on systems
that do not comply with the OF spec. Submitted by: Anders Gavare MFC after: 1 week
This commit is contained in:
parent
b636ebaa6a
commit
8bab0d80ca
2 changed files with 3 additions and 3 deletions
|
|
@ -171,10 +171,10 @@ parse_ofw_memory(phandle_t node, const char *prop, struct mem_region *output)
|
|||
*/
|
||||
phandle = OF_finddevice("/");
|
||||
if (OF_getprop(phandle, "#address-cells", &address_cells,
|
||||
sizeof(address_cells)) < sizeof(address_cells))
|
||||
sizeof(address_cells)) < (ssize_t)sizeof(address_cells))
|
||||
address_cells = 1;
|
||||
if (OF_getprop(phandle, "#size-cells", &size_cells,
|
||||
sizeof(size_cells)) < sizeof(size_cells))
|
||||
sizeof(size_cells)) < (ssize_t)sizeof(size_cells))
|
||||
size_cells = 1;
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -293,7 +293,7 @@ macio_attach(device_t dev)
|
|||
* Locate the device node and it's base address
|
||||
*/
|
||||
if (OF_getprop(root, "assigned-addresses",
|
||||
reg, sizeof(reg)) < sizeof(reg)) {
|
||||
reg, sizeof(reg)) < (ssize_t)sizeof(reg)) {
|
||||
return (ENXIO);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue