list: Improve comment to cover the sort case

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
This commit is contained in:
Otavio Pontes
2019-09-24 14:51:27 -07:00
parent 4af2023020
commit 7b2cd12d64
+4 -2
View File
@@ -23,8 +23,10 @@ struct list {
/**
* @brief Callback to compare two datas in a list.
* The comparison_fn should behave similar to strcmp(), returning 0 if
* it is a match, and "< 0" or "> 0" if it is not.
* The comparison function should return 0 if a is equal to b,
* any number "< 0" if a is lower than b and any number "> 0" if
* a is bigger than b.
* This behavior is similar to strcmp() and other standard compare functions.
*/
typedef int (*comparison_fn_t)(const void *a, const void *b);