From a1b0091ca7d685209dc41d66a718f2b0ed66f397 Mon Sep 17 00:00:00 2001 From: dteske Date: Thu, 5 Mar 2015 00:29:58 +0000 Subject: MFC r273067: Fix awk(1) asorti() implementation to work when called in a loop. --- usr.sbin/bsdconfig/share/device.subr | 1 + 1 file changed, 1 insertion(+) (limited to 'usr.sbin/bsdconfig/share/device.subr') diff --git a/usr.sbin/bsdconfig/share/device.subr b/usr.sbin/bsdconfig/share/device.subr index d93cd9b..4e60d84 100644 --- a/usr.sbin/bsdconfig/share/device.subr +++ b/usr.sbin/bsdconfig/share/device.subr @@ -1118,6 +1118,7 @@ f_device_sort_by_awk=' # -v prop="property" function asorti(src, dest) { + k = nitems = 0 for (i in src) dest[++nitems] = i for (i = 1; i <= nitems; k = i++) { idx = dest[i] -- cgit v1.1