mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-24 19:10:31 +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...".
This commit is contained in:
parent
421cf84343
commit
da612acc6a
1 changed files with 2 additions and 2 deletions
|
|
@ -4031,8 +4031,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