Commit 48fca1e0 authored by Sven Neumann's avatar Sven Neumann Committed by Ross Burton
Browse files

Remove redundant code

There's no point in setting "l" to the next list member here as we
are done with it anyway. Remove redundant code and use local variables
to make it clear that the variable is not used afterwards.
parent 42d0c930
......@@ -746,7 +746,6 @@ gupnp_control_point_resource_unavailable
{
GUPnPControlPoint *control_point;
char *udn, *service_type;
GList *l, *cur_l;
control_point = GUPNP_CONTROL_POINT (resource_browser);
......@@ -756,7 +755,7 @@ gupnp_control_point_resource_unavailable
/* Find proxy */
if (service_type) {
l = find_service_node (control_point, udn, service_type);
GList *l = find_service_node (control_point, udn, service_type);
if (l) {
GUPnPServiceProxy *proxy;
......@@ -764,12 +763,9 @@ gupnp_control_point_resource_unavailable
/* Remove proxy */
proxy = GUPNP_SERVICE_PROXY (l->data);
cur_l = l;
l = l->next;
control_point->priv->services =
g_list_delete_link
(control_point->priv->services, cur_l);
(control_point->priv->services, l);
g_signal_emit (control_point,
signals[SERVICE_PROXY_UNAVAILABLE],
......@@ -779,7 +775,7 @@ gupnp_control_point_resource_unavailable
g_object_unref (proxy);
}
} else {
l = find_device_node (control_point, udn);
GList *l = find_device_node (control_point, udn);
if (l) {
GUPnPDeviceProxy *proxy;
......@@ -787,12 +783,9 @@ gupnp_control_point_resource_unavailable
/* Remove proxy */
proxy = GUPNP_DEVICE_PROXY (l->data);
cur_l = l;
l = l->next;
control_point->priv->devices =
g_list_delete_link
(control_point->priv->devices, cur_l);
(control_point->priv->devices, l);
g_signal_emit (control_point,
signals[DEVICE_PROXY_UNAVAILABLE],
......
Markdown is supported
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