From: Arran Cudbard-Bell Date: Wed, 14 Aug 2019 22:47:42 +0000 (-0400) Subject: Document -1 length value for fr_table_num_by_substr X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a33955e021b0320709e2bcb024fb1198960ddb71;p=thirdparty%2Ffreeradius-server.git Document -1 length value for fr_table_num_by_substr --- diff --git a/src/lib/util/table.c b/src/lib/util/table.c index b00c707a0e8..32c53ac5b3a 100644 --- a/src/lib/util/table.c +++ b/src/lib/util/table.c @@ -93,6 +93,8 @@ int fr_table_ordered_num_by_str(fr_table_ordered_t const *table, size_t table_le * @param[in] table_len The number of elements in the table. * @param[in] name to locate. * @param[in] name_len the maximum amount of name that should be matched. + * If < 0, the length of the name in the table element + * will be used as the maximum match length. * @param[in] def Value to return if there are no matches. * @return * - num value of matching entry. @@ -134,6 +136,8 @@ int fr_table_sorted_num_by_substr(fr_table_sorted_t const *table, size_t table_l * @param[in] table_len The number of elements in the table. * @param[in] name to locate. * @param[in] name_len the maximum amount of name that should be matched. + * If < 0, the length of the name in the table element + * will be used as the maximum match length. * @param[in] def Value to return if there are no matches. * @return * - num value of matching entry. diff --git a/src/lib/util/table.h b/src/lib/util/table.h index d44b36090f9..7231022026c 100644 --- a/src/lib/util/table.h +++ b/src/lib/util/table.h @@ -90,6 +90,8 @@ int fr_table_ordered_num_by_substr(fr_table_ordered_t const *table, size_t tabl * @param[in] _table to search in. * @param[in] _name to resolve to a number. * @param[in] _name_len The amount of name to match. + * If < 0, the length of the name in the table element + * will be used as the maximum match length. * @param[in] _def Default value if no entry matched. * @return * - _def if name matched no entries in the table.