diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2023-08-23 12:06:59 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2023-08-23 12:06:59 +0200 |
commit | 7afc43901d6af27cb421cc878e9bd38a35f3b97f (patch) | |
tree | 2728ea0dc96d7034e6fda64e98b1f1fe0d5632a7 /src/plugins/irc/irc-server.c | |
parent | 49f52cc05193a69cce1d423b0980ee3ad9352613 (diff) | |
download | weechat-7afc43901d6af27cb421cc878e9bd38a35f3b97f.zip |
irc: move function irc_server_fingerprint_search_algo_with_size
Diffstat (limited to 'src/plugins/irc/irc-server.c')
-rw-r--r-- | src/plugins/irc/irc-server.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c index 5f468d0eb..1d0c50e90 100644 --- a/src/plugins/irc/irc-server.c +++ b/src/plugins/irc/irc-server.c @@ -404,6 +404,28 @@ irc_server_eval_expression (struct t_irc_server *server, const char *string) } /* + * Searches for a fingerprint digest algorithm with the size (in bits). + * + * Returns index of algo in enum t_irc_fingerprint_digest_algo, + * -1 if not found. + */ + +int +irc_server_fingerprint_search_algo_with_size (int size) +{ + int i; + + for (i = 0; i < IRC_FINGERPRINT_NUM_ALGOS; i++) + { + if (irc_fingerprint_digest_algos_size[i] == size) + return i; + } + + /* digest algorithm not found */ + return -1; +} + +/* * Evaluates and returns the fingerprint. * * Returns the evaluated fingerprint, NULL if the fingerprint option is @@ -4774,28 +4796,6 @@ irc_server_create_buffer (struct t_irc_server *server) } /* - * Searches for a fingerprint digest algorithm with the size (in bits). - * - * Returns index of algo in enum t_irc_fingerprint_digest_algo, - * -1 if not found. - */ - -int -irc_server_fingerprint_search_algo_with_size (int size) -{ - int i; - - for (i = 0; i < IRC_FINGERPRINT_NUM_ALGOS; i++) - { - if (irc_fingerprint_digest_algos_size[i] == size) - return i; - } - - /* digest algorithm not found */ - return -1; -} - -/* * Returns a string with sizes of allowed fingerprint, * in number of hexadecimal digits (== bits / 4). * |