diff --git a/src/libs/compat/freebsd_network/compat.c b/src/libs/compat/freebsd_network/compat.c index febd146ba4..52594a7cd6 100644 --- a/src/libs/compat/freebsd_network/compat.c +++ b/src/libs/compat/freebsd_network/compat.c @@ -183,7 +183,7 @@ device_get_children(device_t dev, device_t **devlistp, int *devcountp) device_t *list; count = 0; - while (list_get_next_item(&dev->children, child) != NULL) { + while ((child = list_get_next_item(&dev->children, child)) != NULL) { count++; }