mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-03 23:28:58 +00:00
Restore the behavior of returning the total number of units by
unconditionally incrementing i in the loop; Reported by: cem MFC with: r330880 Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14685
This commit is contained in:
parent
8475a4175f
commit
94598ac9f9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=331008
|
@ -1765,7 +1765,8 @@ xmdctlioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread
|
|||
i = 1;
|
||||
LIST_FOREACH(sc, &md_softc_list, list) {
|
||||
if (i < MDNPAD - 1)
|
||||
mdio->md_pad[i++] = sc->unit;
|
||||
mdio->md_pad[i] = sc->unit;
|
||||
i++;
|
||||
}
|
||||
mdio->md_pad[MIN(i, MDNPAD - 1)] = -1;
|
||||
mdio->md_pad[0] = i - 1;
|
||||
|
|
Loading…
Reference in a new issue