[lttng-dev] [PATCH] Use lu% instead ld% to print count

yaowenbin yaowenbin1 at huawei.com
Wed Jun 8 23:08:25 EDT 2022


In ht_count_del function, the type of count variable is defined as unsigned long,
so use lu% instead ld% to print it.

Signed-off-by: yaowenbin1 <yaowenbin1 at huawei.com>
---
 src/rculfhash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/rculfhash.c b/src/rculfhash.c
index 8046f3a..872d6ff 100644
--- a/src/rculfhash.c
+++ b/src/rculfhash.c
@@ -763,7 +763,7 @@ void ht_count_del(struct cds_lfht *ht, unsigned long size, unsigned long hash)

 	if ((count >> CHAIN_LEN_RESIZE_THRESHOLD) >= size)
 		return;
-	dbg_printf("del set global %ld\n", count);
+	dbg_printf("del set global %lu\n", count);
 	/*
 	 * Don't shrink table if the number of nodes is below a
 	 * certain threshold.
-- 
2.27.0


More information about the lttng-dev mailing list