diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2023-12-19 23:57:34 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2023-12-19 23:57:34 +0100 |
commit | 7b8df68e4f96ac4a246530fa9ec177a5394eb322 (patch) | |
tree | 3f7d7b595e9601c7331e75f0a86f99b3b671736e /FICS | |
parent | 8b3bd4ae00d02867990e63a64c93367f7adc7eb2 (diff) |
Reformatted alias_lookup()
Diffstat (limited to 'FICS')
-rw-r--r-- | FICS/command.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/FICS/command.c b/FICS/command.c index 62594f2..c153f9f 100644 --- a/FICS/command.c +++ b/FICS/command.c @@ -115,16 +115,14 @@ parse_command(char *com_string, char **comm, char **parameters) return COM_OK; } -PUBLIC int alias_lookup(char *tmp, alias_type *alias_list, int numalias) -/* numalias is the maximum number to search through */ +PUBLIC int +alias_lookup(char *tmp, alias_type *alias_list, int numalias) { - int i; - - for (i = 0; (alias_list[i].comm_name && i < numalias); i++) { - if (!strcmp(tmp, alias_list[i].comm_name)) - return i; - } - return -1; /* not found */ + for (int i = 0; (alias_list[i].comm_name && i < numalias); i++) { + if (!strcmp(tmp, alias_list[i].comm_name)) + return i; + } + return -1; /* not found */ } PUBLIC int alias_count(alias_type *alias_list) |