summaryrefslogtreecommitdiffstats
path: root/htop.c
diff options
context:
space:
mode:
authorNathan Scott <nathans@redhat.com>2020-09-09 19:38:15 +1000
committerNathan Scott <nathans@redhat.com>2020-09-09 19:38:15 +1000
commit459733295954ec0d5958f9a8d955d0c164876c84 (patch)
treefe10a871c5c51bc7f98e275242bbed0276788415 /htop.c
parentc5808c56db166528ae7e74cedb51cc466f973b9f (diff)
Switch variable/field naming from WhiteList to MatchList
Diffstat (limited to 'htop.c')
-rw-r--r--htop.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/htop.c b/htop.c
index 37727d00..2cf2602e 100644
--- a/htop.c
+++ b/htop.c
@@ -57,7 +57,7 @@ static void printHelpFlag() {
// ----------------------------------------
typedef struct CommandLineSettings_ {
- Hashtable* pidWhiteList;
+ Hashtable* pidMatchList;
uid_t userId;
int sortKey;
int delay;
@@ -70,7 +70,7 @@ typedef struct CommandLineSettings_ {
static CommandLineSettings parseArguments(int argc, char** argv) {
CommandLineSettings flags = {
- .pidWhiteList = NULL,
+ .pidMatchList = NULL,
.userId = -1, // -1 is guaranteed to be an invalid uid_t (see setreuid(2))
.sortKey = 0,
.delay = -1,
@@ -163,13 +163,13 @@ static CommandLineSettings parseArguments(int argc, char** argv) {
char* saveptr;
char* pid = strtok_r(argCopy, ",", &saveptr);
- if(!flags.pidWhiteList) {
- flags.pidWhiteList = Hashtable_new(8, false);
+ if(!flags.pidMatchList) {
+ flags.pidMatchList = Hashtable_new(8, false);
}
while(pid) {
unsigned int num_pid = atoi(pid);
- Hashtable_put(flags.pidWhiteList, num_pid, (void *) 1);
+ Hashtable_put(flags.pidMatchList, num_pid, (void *) 1);
pid = strtok_r(NULL, ",", &saveptr);
}
free(argCopy);
@@ -215,7 +215,7 @@ int main(int argc, char** argv) {
Process_setupColumnWidths();
UsersTable* ut = UsersTable_new();
- ProcessList* pl = ProcessList_new(ut, flags.pidWhiteList, flags.userId);
+ ProcessList* pl = ProcessList_new(ut, flags.pidMatchList, flags.userId);
Settings* settings = Settings_new(pl->cpuCount);
pl->settings = settings;
@@ -281,8 +281,8 @@ int main(int argc, char** argv) {
UsersTable_delete(ut);
Settings_delete(settings);
- if(flags.pidWhiteList) {
- Hashtable_delete(flags.pidWhiteList);
+ if(flags.pidMatchList) {
+ Hashtable_delete(flags.pidMatchList);
}
return 0;
}

© 2014-2024 Faster IT GmbH | imprint | privacy policy