mirror of
https://github.com/profanity-im/profanity.git
synced 2025-01-03 14:57:42 -05:00
Removing strdup calls per cmd_connect design
This commit is contained in:
parent
28425060bc
commit
a4e2809756
@ -1623,9 +1623,9 @@ cmd_join(gchar **args, struct cmd_help_t help)
|
||||
return TRUE;
|
||||
}
|
||||
if (strcmp(opt1, "nick") == 0) {
|
||||
nick = strdup(opt1val);
|
||||
nick = opt1val;
|
||||
} else if (strcmp(opt1, "passwd") == 0) {
|
||||
passwd = strdup(opt1val);
|
||||
passwd = opt1val;
|
||||
} else {
|
||||
cons_show("Usage: %s", help.usage);
|
||||
cons_show("");
|
||||
@ -1633,9 +1633,9 @@ cmd_join(gchar **args, struct cmd_help_t help)
|
||||
}
|
||||
if (opt2 != NULL) {
|
||||
if (strcmp(opt2, "nick") == 0) {
|
||||
nick = strdup(opt2val);
|
||||
nick = opt2val;
|
||||
} else if (strcmp(opt2, "passwd") == 0) {
|
||||
passwd = strdup(opt2val);
|
||||
passwd = opt2val;
|
||||
} else {
|
||||
cons_show("Usage: %s", help.usage);
|
||||
cons_show("");
|
||||
|
Loading…
Reference in New Issue
Block a user