1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-29 04:45:57 -04:00

Miscellaneous fixes

Stylistic stuff, please ignore.
This commit is contained in:
LemonBoy 2017-10-23 20:08:19 +02:00
parent f683e81880
commit 74409aa850

View File

@ -86,14 +86,14 @@ static gboolean parse_cap_name(char *name, char **key, char **val)
const char *eq = strchr(name, '=');
/* KEY only value */
if (!eq) {
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') {
*key = g_strndup(name, (int)(eq - name));
*key = g_strndup(name, (gsize)(eq - name));
*val = g_strdup(eq + 1);
return TRUE;
}