Undocumented return value of `sd_bus_get_timeout`

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear All,

according to the man page `sd_bus_get_timeout` returns a non-negative value in case of an success, so a typical check should be `r < 0`.

However, in your code there's a distinction between *less than zero*, *zero* and *larger than zero*: https://github.com/systemd/systemd/blob/c06d2e440c07756391c527814611a7f5633a12d9/src/libsystemd/sd-bus/sd-bus.c#L3689-L3692

Is this just internal behaviour or can we rely on that if the value is `0`, the returned timeout is always `UINT64_MAX`?
If so, the documentation should be adjusted, I can make a PR if wanted.

Many thanks,
Marcel



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux