dev: remove strcln in favor of strdup

This commit is contained in:
2025-06-11 16:13:01 +02:00
parent aa1cafe743
commit cbb3aa3910
4 changed files with 3 additions and 8 deletions

View File

@@ -46,7 +46,7 @@ struct Vector get_human_users() {
struct passwd* NULLABLE pwd;
while ((pwd = getpwent()) != NULL) {
if (strcmp(pwd->pw_dir, "/home/") != 0) continue;
if (!pwd->pw_dir || strcmp(pwd->pw_dir, "/home/") != 0) continue;
struct user* user_i = malloc(sizeof(struct user));
if (user_i == NULL) continue; // malloc error