summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/irc/core/irc-cap.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/irc/core/irc-cap.c b/src/irc/core/irc-cap.c
index 95a051f0..dd720841 100644
--- a/src/irc/core/irc-cap.c
+++ b/src/irc/core/irc-cap.c
@@ -91,19 +91,13 @@ static gboolean parse_cap_name(char *name, char **key, char **val)
if (eq == NULL) {
*key = g_strdup(name);
*val = NULL;
- return TRUE;
/* Some values are in a KEY=VALUE form, parse them */
- } else if (eq[1] != '\0') {
+ } else {
*key = g_strndup(name, (gsize)(eq - name));
*val = g_strdup(eq + 1);
- return TRUE;
- /* If the string ends after the '=' consider the value
- * as invalid */
- } else {
- *key = NULL;
- *val = NULL;
- return FALSE;
}
+
+ return TRUE;
}
static void event_cap (IRC_SERVER_REC *server, char *args, char *nick, char *address)