mirror of
https://github.com/irssi/irssi.git
synced 2026-08-21 01:22:26 +02:00
Miscellaneous fixes
Stylistic stuff, please ignore.
This commit is contained in:
parent
f683e81880
commit
74409aa850
1 changed files with 2 additions and 2 deletions
|
|
@ -86,14 +86,14 @@ static gboolean parse_cap_name(char *name, char **key, char **val)
|
||||||
|
|
||||||
const char *eq = strchr(name, '=');
|
const char *eq = strchr(name, '=');
|
||||||
/* KEY only value */
|
/* KEY only value */
|
||||||
if (!eq) {
|
if (eq == NULL) {
|
||||||
*key = g_strdup(name);
|
*key = g_strdup(name);
|
||||||
*val = NULL;
|
*val = NULL;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
/* Some values are in a KEY=VALUE form, parse them */
|
/* Some values are in a KEY=VALUE form, parse them */
|
||||||
else if (eq[1] != '\0') {
|
else if (eq[1] != '\0') {
|
||||||
*key = g_strndup(name, (int)(eq - name));
|
*key = g_strndup(name, (gsize)(eq - name));
|
||||||
*val = g_strdup(eq + 1);
|
*val = g_strdup(eq + 1);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue