From dfbfa84d1df5452825ded5500a2e42f6ec64a724 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 25 Aug 2015 08:06:45 +0200 Subject: m + attributes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/libmdsserver/linked-list.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/libmdsserver/linked-list.c') diff --git a/src/libmdsserver/linked-list.c b/src/libmdsserver/linked-list.c index f94ea50..8cdd1bd 100644 --- a/src/libmdsserver/linked-list.c +++ b/src/libmdsserver/linked-list.c @@ -38,6 +38,7 @@ * @param value The value to be rounded up to a power of two * @return The nearest, but not smaller, power of two */ +__attribute__((const)) static size_t to_power_of_two(size_t value) { value -= 1; @@ -214,6 +215,7 @@ int linked_list_pack(linked_list_t* restrict this) * @return The next free position, * `LINKED_LIST_UNUSED` on error, `errno` will be set accordingly */ +__attribute__((nonnull)) static ssize_t linked_list_get_next(linked_list_t* restrict this) { size_t* tmp_values; @@ -246,6 +248,7 @@ static ssize_t linked_list_get_next(linked_list_t* restrict this) * @param node The position * @return The position */ +__attribute__((nonnull)) static ssize_t linked_list_unuse(linked_list_t* restrict this, ssize_t node) { if (node < 0) -- cgit v1.2.3-70-g09d2