From 7b2cd12d64f7f62c4d845cd747ae61847ef3466f Mon Sep 17 00:00:00 2001 From: Otavio Pontes Date: Mon, 23 Sep 2019 10:09:43 -0700 Subject: [PATCH] list: Improve comment to cover the sort case Signed-off-by: Otavio Pontes --- src/lib/list.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/list.h b/src/lib/list.h index b6c41f7b..ec7e999c 100644 --- a/src/lib/list.h +++ b/src/lib/list.h @@ -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);