summaryrefslogtreecommitdiffstats
path: root/ProcessList.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2006-07-12 01:35:59 +0000
committerHisham Muhammad <hisham@gobolinux.org>2006-07-12 01:35:59 +0000
commiteb2803ce79604b45c070edbe1e787f4373949cfe (patch)
tree1a4cce8598daff9fd6f7d88d9746557f73290599 /ProcessList.c
parentdbe2670b69e163cb146d3fc3b3c7b82ea3f71278 (diff)
Share name strings from UsersList
Diffstat (limited to 'ProcessList.c')
-rw-r--r--ProcessList.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/ProcessList.c b/ProcessList.c
index c2c6433c..87db785c 100644
--- a/ProcessList.c
+++ b/ProcessList.c
@@ -541,12 +541,7 @@ void ProcessList_processEntries(ProcessList* this, char* dirname, int parent, fl
goto errorReadingProcess;
if(!existingProcess) {
- char* username = UsersTable_getRef(this->usersTable, process->st_uid);
- if (username) {
- strncpy(process->user, username, PROCESS_USER_LEN);
- } else {
- snprintf(process->user, PROCESS_USER_LEN, "%d", process->st_uid);
- }
+ process->user = UsersTable_getRef(this->usersTable, process->st_uid);
snprintf(statusfilename, MAX_NAME, "%s/%s/cmdline", dirname, name);
status = ProcessList_fopen(this, statusfilename, "r");

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