mirror of
https://github.com/javalsai/lidm.git
synced 2025-09-01 02:47:59 +02:00
dev: remove strcln in favor of strdup
This commit is contained in:
@@ -174,7 +174,8 @@ bool launch(char* user, char* passwd, struct session session, void (*cb)(void),
|
||||
if (pid == 0) { // child
|
||||
char* term = NULL;
|
||||
char* getterm = getenv("TERM");
|
||||
if (getterm != NULL) strcln(&term, getterm);
|
||||
// TODO: handle malloc error
|
||||
if (getterm != NULL) term = strdup(getterm);
|
||||
if (clearenv() != 0) {
|
||||
print_errno("clearenv");
|
||||
_exit(EXIT_FAILURE);
|
||||
|
Reference in New Issue
Block a user