Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Jun 2023 05:37:49 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 5c6393451f58 - main - top(8): designate the sorted_state[] array as constant
Message-ID:  <202306210537.35L5bn3m048311@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by kib:

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

commit 5c6393451f58c4e6c92410ae66e28c899bfacdb9
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2023-06-19 13:49:19 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2023-06-21 05:36:33 +0000

    top(8): designate the sorted_state[] array as constant
    
    Reviewed by:    kevans
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D40607
---
 usr.bin/top/machine.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c
index 2fbdb8551bb0..c11851ebce63 100644
--- a/usr.bin/top/machine.c
+++ b/usr.bin/top/machine.c
@@ -1261,7 +1261,7 @@ compare_tid(const void *p1, const void *p2)
  *	that reflects this ordering.
  */
 
-static int sorted_state[] = {
+static const int sorted_state[] = {
 	0,	/* not used		*/
 	3,	/* sleep		*/
 	1,	/* ABANDONED (WAIT)	*/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202306210537.35L5bn3m048311>