Date: Thu, 15 Mar 2018 16:37:43 +0000 (UTC) From: Brooks Davis <brooks@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331008 - head/sys/dev/md Message-ID: <201803151637.w2FGbhvr077486@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: brooks Date: Thu Mar 15 16:37:43 2018 New Revision: 331008 URL: https://svnweb.freebsd.org/changeset/base/331008 Log: 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 Modified: head/sys/dev/md/md.c Modified: head/sys/dev/md/md.c ============================================================================== --- head/sys/dev/md/md.c Thu Mar 15 16:17:02 2018 (r331007) +++ head/sys/dev/md/md.c Thu Mar 15 16:37:43 2018 (r331008) @@ -1765,7 +1765,8 @@ err_after_new: 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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803151637.w2FGbhvr077486>