mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-03 22:10:14 +01:00
platform: fix lifetime/preferred type in _address_get_lifetime()
They are defined as gint32 but are assigned a guint32 value and then immediately passed back to the caller of _address_get_lifetime() as guint32. They can never be negative, and may receive values greater than G_MAXINT32, so they should be unsigned.
This commit is contained in:
parent
1b40c95c84
commit
fb78b671d7
1 changed files with 1 additions and 1 deletions
|
|
@ -1698,7 +1698,7 @@ _rebase_relative_time_on_now (guint32 timestamp, guint32 duration, guint32 now,
|
|||
static gboolean
|
||||
_address_get_lifetime (const NMPlatformIPAddress *address, guint32 now, guint32 padding, guint32 *out_lifetime, guint32 *out_preferred)
|
||||
{
|
||||
gint32 lifetime, preferred;
|
||||
guint32 lifetime, preferred;
|
||||
|
||||
if (address->lifetime == 0) {
|
||||
*out_lifetime = NM_PLATFORM_LIFETIME_PERMANENT;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue