Searched refs:saturate_add (Results 1 – 3 of 3) sorted by relevance
/systemd-251/src/test/ |
D | test-macro.c | 9 TEST(saturate_add) { in TEST() argument 10 assert_se(saturate_add(1, 2, UINT8_MAX) == 3); in TEST() 11 assert_se(saturate_add(1, UINT8_MAX-2, UINT8_MAX) == UINT8_MAX-1); in TEST() 12 assert_se(saturate_add(1, UINT8_MAX-1, UINT8_MAX) == UINT8_MAX); in TEST() 13 assert_se(saturate_add(1, UINT8_MAX, UINT8_MAX) == UINT8_MAX); in TEST() 14 assert_se(saturate_add(2, UINT8_MAX, UINT8_MAX) == UINT8_MAX); in TEST() 15 assert_se(saturate_add(60, 60, 50) == 50); in TEST()
|
/systemd-251/src/basic/ |
D | macro.h | 460 #define saturate_add(x, y, limit) \ macro 468 return saturate_add(x, y, SIZE_MAX); in size_add()
|
/systemd-251/src/resolve/ |
D | resolved-dns-answer.c | 63 n = saturate_add(m, n, UINT16_MAX); in dns_answer_reserve_internal() 699 ns = saturate_add(ns, n_free, UINT16_MAX); in dns_answer_reserve_or_clone()
|