mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-13 04:34:35 +03:00
Avoid some unnecessary casts and mark some not changing variables const
This commit is contained in:

committed by
cgzones

parent
27870bd4de
commit
ac2b07eddd
@ -30,9 +30,9 @@ void UsersTable_delete(UsersTable* this) {
|
||||
}
|
||||
|
||||
char* UsersTable_getRef(UsersTable* this, unsigned int uid) {
|
||||
char* name = (char*) (Hashtable_get(this->users, uid));
|
||||
char* name = Hashtable_get(this->users, uid);
|
||||
if (name == NULL) {
|
||||
struct passwd* userData = getpwuid(uid);
|
||||
const struct passwd* userData = getpwuid(uid);
|
||||
if (userData != NULL) {
|
||||
name = xStrdup(userData->pw_name);
|
||||
Hashtable_put(this->users, uid, name);
|
||||
|
Reference in New Issue
Block a user