git: deb1289c9e6a - stable/13 - top(8): use designated initializers for sorted_state[]

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Wed, 28 Jun 2023 00:57:16 UTC
The branch stable/13 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=deb1289c9e6a225ad05d4d0d710f3c42297e14df

commit deb1289c9e6a225ad05d4d0d710f3c42297e14df
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2023-06-19 13:52:05 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2023-06-27 21:04:15 +0000

    top(8): use designated initializers for sorted_state[]
    
    (cherry picked from commit bc2ac2585aa89c110861972aeb243719ea5012b8)
---
 usr.bin/top/machine.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c
index c11851ebce63..033861d3f7fb 100644
--- a/usr.bin/top/machine.c
+++ b/usr.bin/top/machine.c
@@ -1262,13 +1262,12 @@ compare_tid(const void *p1, const void *p2)
  */
 
 static const int sorted_state[] = {
-	0,	/* not used		*/
-	3,	/* sleep		*/
-	1,	/* ABANDONED (WAIT)	*/
-	6,	/* run			*/
-	5,	/* start		*/
-	2,	/* zombie		*/
-	4	/* stop			*/
+	[SIDL] =	3,	/* being created	*/
+	[SRUN] =	1,	/* running/runnable	*/
+	[SSLEEP] =	6,	/* sleeping		*/
+	[SSTOP] =	5,	/* stopped/suspended	*/
+	[SZOMB] =	2,	/* zombie		*/
+	[SWAIT] =	4,	/* intr			*/
 };