diff options
author | LemonBoy <thatlemon@gmail.com> | 2018-01-07 12:44:28 +0100 |
---|---|---|
committer | LemonBoy <thatlemon@gmail.com> | 2018-01-24 10:45:54 +0100 |
commit | 474ee8ee70c9ff9c69487746a9740355f38a01b2 (patch) | |
tree | 379c62c5b7bef5ac42746c415bd8f51829c5d8b4 | |
parent | fed791ed9100552edbe643d8b3d0e0bc271e88d4 (diff) | |
download | irssi-474ee8ee70c9ff9c69487746a9740355f38a01b2.zip |
Address some minor stylish nits
-rw-r--r-- | src/irc/core/irc-cap.c | 10 | ||||
-rw-r--r-- | src/irc/core/irc-servers.c | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/irc/core/irc-cap.c b/src/irc/core/irc-cap.c index 90bffd80..95a051f0 100644 --- a/src/irc/core/irc-cap.c +++ b/src/irc/core/irc-cap.c @@ -81,25 +81,25 @@ static void cap_emit_signal (IRC_SERVER_REC *server, char *cmd, char *args) static gboolean parse_cap_name(char *name, char **key, char **val) { + const char *eq; + g_return_val_if_fail(name != NULL, FALSE); g_return_val_if_fail(name[0] != '\0', FALSE); - const char *eq = strchr(name, '='); + eq = strchr(name, '='); /* KEY only value */ 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 if (eq[1] != '\0') { *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 { + } else { *key = NULL; *val = NULL; return FALSE; diff --git a/src/irc/core/irc-servers.c b/src/irc/core/irc-servers.c index 3b4e1a52..e154d17f 100644 --- a/src/irc/core/irc-servers.c +++ b/src/irc/core/irc-servers.c @@ -444,8 +444,8 @@ static void sig_disconnected(IRC_SERVER_REC *server) server->cap_active = NULL; if (server->cap_supported) { - g_hash_table_destroy(server->cap_supported); - server->cap_supported = NULL; + g_hash_table_destroy(server->cap_supported); + server->cap_supported = NULL; } gslist_free_full(server->cap_queue, (GDestroyNotify) g_free); |