1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Tidy execute alias code

This commit is contained in:
James Booth 2015-04-21 23:45:03 +01:00
parent 88739d5c59
commit 1c47b57e19

View File

@ -137,18 +137,18 @@ cmd_execute_alias(const char * const inp, gboolean *ran)
if (inp[0] != '/') { if (inp[0] != '/') {
ran = FALSE; ran = FALSE;
return TRUE; return TRUE;
} else {
char *alias = strdup(inp+1);
char *value = prefs_get_alias(alias);
free(alias);
if (value != NULL) {
*ran = TRUE;
return cmd_process_input(value);
} else {
*ran = FALSE;
return TRUE;
}
} }
char *alias = strdup(inp+1);
char *value = prefs_get_alias(alias);
free(alias);
if (value) {
*ran = TRUE;
return cmd_process_input(value);
}
*ran = FALSE;
return TRUE;
} }
gboolean gboolean