sd-netlink: change error code of the case that too many replies waiting
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 1 Dec 2023 05:17:58 +0000 (14:17 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 1 Dec 2023 05:37:05 +0000 (14:37 +0900)
ERANGE should be used when setting or parsing a number.

src/libsystemd/sd-netlink/sd-netlink.c

index 898f11d..8b5c473 100644 (file)
@@ -477,7 +477,7 @@ int sd_netlink_call_async(
         assert_return(!netlink_pid_changed(nl), -ECHILD);
 
         if (hashmap_size(nl->reply_callbacks) >= REPLY_CALLBACKS_MAX)
-                return -ERANGE;
+                return -EXFULL;
 
         r = hashmap_ensure_allocated(&nl->reply_callbacks, &trivial_hash_ops);
         if (r < 0)