diff options
author | James Booth <boothj5@gmail.com> | 2015-04-21 23:45:03 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-04-21 23:45:03 +0100 |
commit | 1c47b57e195609511c3acd52a6d5e46e8288edca (patch) | |
tree | 0ea6d1991f2340704926fb128254c46dba0315ad | |
parent | 88739d5c59022b4d1f1b67da3128cb4a3266ecf9 (diff) | |
download | profani-tty-1c47b57e195609511c3acd52a6d5e46e8288edca.tar.gz |
Tidy execute alias code
-rw-r--r-- | src/command/commands.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/command/commands.c b/src/command/commands.c index 713cd0ef..529a1019 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -137,18 +137,18 @@ cmd_execute_alias(const char * const inp, gboolean *ran) if (inp[0] != '/') { ran = FALSE; 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 |