mirror of
https://github.com/javalsai/lidm.git
synced 2026-01-13 00:50:00 +01: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