sd-netlink: make netlink_get_reply_callback_count() accept NULL

This commit is contained in:
Yu Watanabe
2025-08-18 03:54:04 +09:00
parent 114c4b95df
commit 9b75c41cb3

View File

@@ -466,7 +466,8 @@ static int timeout_compare(const void *a, const void *b) {
}
size_t netlink_get_reply_callback_count(sd_netlink *nl) {
assert(nl);
if (!nl)
return 0;
return hashmap_size(nl->reply_callbacks);
}