diff options
author | Dan Williams <dcbw@redhat.com> | 2014-11-05 12:37:37 -0600 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2014-11-05 12:44:59 -0600 |
commit | fb78b671d71ec7b6a0bef5e1c1497a9aded687bc (patch) | |
tree | 800ec8f00e8f53159241b5d026033327a71d9a02 | |
parent | 1b40c95c846cbb85547c826d329415b4ece0bce1 (diff) | |
download | NetworkManager-fb78b671d71ec7b6a0bef5e1c1497a9aded687bc.tar.gz |
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.
-rw-r--r-- | src/platform/nm-platform.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/platform/nm-platform.c b/src/platform/nm-platform.c index 5d478e87d4..1aa72a4dba 100644 --- a/src/platform/nm-platform.c +++ b/src/platform/nm-platform.c @@ -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; |