]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Document -1 length value for fr_table_num_by_substr
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 14 Aug 2019 22:47:42 +0000 (18:47 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 14 Aug 2019 22:47:42 +0000 (18:47 -0400)
src/lib/util/table.c
src/lib/util/table.h

index b00c707a0e873ebe7b3a1a959ae681ebc5a7c07d..32c53ac5b3a553e9548954f75ab93a7881719441 100644 (file)
@@ -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.
index d44b36090f9a81ef9fec1ea7e3c19543b3cba45f..7231022026cf8cd49aed7bad4358a7bfcbbe55ed 100644 (file)
@@ -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.