mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-15 03:20:38 +01:00
linux-platform: correct the lifetime conditional
Coverity detected that it was always-true:
src/platform/nm-linux-platform.c:4035: dead_error_line: Execution cannot reach the expression "preferred != 0U" inside this statement: "if (lifetime != 0U || lifet...".
(cherry picked from commit da612acc6a)
This commit is contained in:
parent
57b4de25ea
commit
a051446492
1 changed files with 2 additions and 2 deletions
|
|
@ -4032,8 +4032,8 @@ build_rtnl_addr (NMPlatform *platform,
|
|||
}
|
||||
|
||||
_nl_rtnl_addr_set_prefixlen (rtnladdr, plen);
|
||||
if ( lifetime != 0 || lifetime != NM_PLATFORM_LIFETIME_PERMANENT
|
||||
|| preferred != 0 || preferred != NM_PLATFORM_LIFETIME_PERMANENT) {
|
||||
if ( (lifetime != 0 && lifetime != NM_PLATFORM_LIFETIME_PERMANENT)
|
||||
|| (preferred != 0 && preferred != NM_PLATFORM_LIFETIME_PERMANENT)) {
|
||||
/* note that here we set the relative timestamps (ticking from *now*). */
|
||||
rtnl_addr_set_valid_lifetime (rtnladdr, lifetime);
|
||||
rtnl_addr_set_preferred_lifetime (rtnladdr, preferred);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue