mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-15 21:44:36 +03:00
Mark some things as const
Several string pointer arrays pointed to const strings but were not const themselves. A few various structures and arrays were also marked const.
This commit is contained in:
4
Action.c
4
Action.c
@ -381,7 +381,7 @@ static Htop_Reaction actionRedraw() {
|
||||
return HTOP_REFRESH | HTOP_REDRAW_BAR;
|
||||
}
|
||||
|
||||
static struct { const char* key; const char* info; } helpLeft[] = {
|
||||
static const struct { const char* key; const char* info; } helpLeft[] = {
|
||||
{ .key = " Arrows: ", .info = "scroll process list" },
|
||||
{ .key = " Digits: ", .info = "incremental PID search" },
|
||||
{ .key = " F3 /: ", .info = "incremental name search" },
|
||||
@ -399,7 +399,7 @@ static struct { const char* key; const char* info; } helpLeft[] = {
|
||||
{ .key = NULL, .info = NULL }
|
||||
};
|
||||
|
||||
static struct { const char* key; const char* info; } helpRight[] = {
|
||||
static const struct { const char* key; const char* info; } helpRight[] = {
|
||||
{ .key = " Space: ", .info = "tag process" },
|
||||
{ .key = " c: ", .info = "tag process and its children" },
|
||||
{ .key = " U: ", .info = "untag all processes" },
|
||||
|
Reference in New Issue
Block a user