Commit b1020666 authored by Dan Williams's avatar Dan Williams
Browse files

2005-09-06 Dan Williams <dcbw@redhat.com>

	Patch from Tomislav Vujec <tvujec@redhat.com>
	* src/NetworkManagerDevice.c
		- (nm_get_device_by_udi): don't return a device when we
			actually didn't find what we were looking for


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/branches/STABLE_0_3@941 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
parent a9a40c37
2005-09-06 Dan Williams <dcbw@redhat.com>
Patch from Tomislav Vujec <tvujec@redhat.com>
* src/NetworkManagerDevice.c
- (nm_get_device_by_udi): don't return a device when we
actually didn't find what we were looking for
2005-09-06 Dan Williams <dcbw@redhat.com>
Patch from Suhail Ahmed <suhail.ahmed@intel.com>
......
......@@ -149,15 +149,14 @@ NMDevice *nm_get_device_by_udi (NMData *data, const char *udi)
for (elt = data->dev_list; elt; elt = g_slist_next (elt))
{
dev = (NMDevice *)(elt->data);
if (dev)
if ((dev = (NMDevice *)(elt->data)))
{
if (nm_null_safe_strcmp (nm_device_get_udi (dev), udi) == 0)
break;
return dev;
}
}
return (dev);
return NULL;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment