| 628 | } |
| 629 | |
| 630 | static int |
| 631 | ifc_alloc_unit_next(struct if_clone *ifc, int *unit) |
| 632 | { |
| 633 | int error; |
| 634 | |
| 635 | *unit = alloc_unr(ifc->ifc_unrhdr); |
| 636 | if (*unit == -1) |
| 637 | return (ENOSPC); |
| 638 | |
| 639 | free_unr(ifc->ifc_unrhdr, *unit); |
| 640 | for (;;) { |
| 641 | error = ifc_alloc_unit_specific(ifc, unit); |
| 642 | if (error != EEXIST) |
| 643 | break; |
| 644 | |
| 645 | (*unit)++; |
| 646 | } |
| 647 | |
| 648 | return (error); |
| 649 | } |
| 650 | |
| 651 | int |
| 652 | ifc_alloc_unit(struct if_clone *ifc, int *unit) |
no test coverage detected