mirror of
https://github.com/systemd/systemd.git
synced 2026-08-05 23:50:42 +00:00
sd-ndisc: allow to call sd_ndisc_router_get_lifetime() with NULL for 'ret'
This commit is contained in:
@@ -303,10 +303,11 @@ int sd_ndisc_router_get_flags(sd_ndisc_router *rt, uint64_t *ret) {
|
||||
|
||||
int sd_ndisc_router_get_lifetime(sd_ndisc_router *rt, uint64_t *ret) {
|
||||
assert_return(rt, -EINVAL);
|
||||
assert_return(ret, -EINVAL);
|
||||
|
||||
*ret = rt->lifetime_usec;
|
||||
return 0;
|
||||
if (ret)
|
||||
*ret = rt->lifetime_usec;
|
||||
|
||||
return rt->lifetime_usec > 0; /* Indicate if the router is still valid or not. */
|
||||
}
|
||||
|
||||
int sd_ndisc_router_get_preference(sd_ndisc_router *rt, unsigned *ret) {
|
||||
|
||||
Reference in New Issue
Block a user