From 7b8df68e4f96ac4a246530fa9ec177a5394eb322 Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Tue, 19 Dec 2023 23:57:34 +0100 Subject: Reformatted alias_lookup() --- FICS/command.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'FICS/command.c') 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) -- cgit v1.2.3