mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-27 20:46:21 +00:00
Removing strdup calls per cmd_connect design
This commit is contained in:
@@ -1623,9 +1623,9 @@ cmd_join(gchar **args, struct cmd_help_t help)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
if (strcmp(opt1, "nick") == 0) {
|
if (strcmp(opt1, "nick") == 0) {
|
||||||
nick = strdup(opt1val);
|
nick = opt1val;
|
||||||
} else if (strcmp(opt1, "passwd") == 0) {
|
} else if (strcmp(opt1, "passwd") == 0) {
|
||||||
passwd = strdup(opt1val);
|
passwd = opt1val;
|
||||||
} else {
|
} else {
|
||||||
cons_show("Usage: %s", help.usage);
|
cons_show("Usage: %s", help.usage);
|
||||||
cons_show("");
|
cons_show("");
|
||||||
@@ -1633,9 +1633,9 @@ cmd_join(gchar **args, struct cmd_help_t help)
|
|||||||
}
|
}
|
||||||
if (opt2 != NULL) {
|
if (opt2 != NULL) {
|
||||||
if (strcmp(opt2, "nick") == 0) {
|
if (strcmp(opt2, "nick") == 0) {
|
||||||
nick = strdup(opt2val);
|
nick = opt2val;
|
||||||
} else if (strcmp(opt2, "passwd") == 0) {
|
} else if (strcmp(opt2, "passwd") == 0) {
|
||||||
passwd = strdup(opt2val);
|
passwd = opt2val;
|
||||||
} else {
|
} else {
|
||||||
cons_show("Usage: %s", help.usage);
|
cons_show("Usage: %s", help.usage);
|
||||||
cons_show("");
|
cons_show("");
|
||||||
|
|||||||
Reference in New Issue
Block a user