ifcfg-rh: fix signature of link_changed() callback

Depending on how arguments are passed to the called function,
this could lead to a crash.

Maybe not on 32 bit machines where the size of the pointer is
the size of an int.

Maybe not on x86_64, where the arguments are passed in registers.

Fixes: b88c309167
This commit is contained in:
Thomas Haller 2016-10-22 13:46:02 +02:00
parent 9f11610606
commit 548a5440e9

View file

@ -116,7 +116,7 @@ devtimeout_ready (gpointer user_data)
}
static void
link_changed (NMPlatform *platform, NMPObjectType *obj_type, int ifindex, const NMPlatformLink *link,
link_changed (NMPlatform *platform, NMPObjectType obj_type, int ifindex, const NMPlatformLink *link,
NMPlatformSignalChangeType change_type,
NMConnection *self)
{
@ -127,7 +127,6 @@ link_changed (NMPlatform *platform, NMPObjectType *obj_type, int ifindex, const
if (g_strcmp0 (link->name, ifname) != 0)
return;
/* Shouldn't happen, but... */
if (change_type == NM_PLATFORM_SIGNAL_REMOVED)
return;