2006-01-11 Robert Love <rml@novell.com>

* configure.in: Add the gcc flags '-Wshadow' and '-Wfloat-equal'.
	* gnome/applet/applet.c, gnome/vpn-properties/nm-vpn-properties.c,
	  src/NetworkManagerAPList.c, src/NetworkManagerDbus.c,
	  src/NetworkManagerPolicy.c, src/NetworkManagerSystem.c,
	  src/nm-dbus-device.c, src/nm-device-802-3-ethernet.c,
	  src/nm-ip4-config.c, src/vpn-manager/nm-vpn-manager.c,
	  test/nmtestdevices.c: Fix shadowed variable usage as appropriate.
	* src/nm-device-802-11-wireless.c: Fix floating point comparison by
	  comparing values within DBL_EPSILON.  Also fix shadowed variable
	  usage.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1318 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Robert Love
2006-01-11 21:07:29 +00:00
committed by Robert Love
parent f2c3f74a13
commit 46efeb868a
14 changed files with 109 additions and 113 deletions

View File

@@ -380,15 +380,15 @@ static gboolean nm_policy_device_change_check (NMData *data)
* from Ad-Hoc APs either.
*/
gboolean same_essid = (strcmp (old_essid, new_essid) == 0);
gboolean link = nm_device_has_active_link (old_dev);
if ((!same_essid || !link) && (old_mode != IW_MODE_ADHOC))
gboolean have_link = nm_device_has_active_link (old_dev);
if ((!same_essid || !have_link) && (old_mode != IW_MODE_ADHOC))
{
nm_info ("SWITCH: found better connection '%s/%s'"
" than current connection '%s/%s'. "
"same_ssid=%d, have_link=%d",
nm_device_get_iface (new_dev), new_essid,
nm_device_get_iface (old_dev), old_essid,
same_essid, link);
same_essid, have_link);
do_switch = TRUE;
}
} /* Always prefer Ethernet over wireless, unless the user explicitly switched away. */