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:
Dan Williams 2014-11-05 12:37:37 -06:00
parent 1b40c95c84
commit fb78b671d7

View file

@ -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;