return NULL;
}
-static int cf_find_timeout(GSList *cf_list, int cls)
+static int cf_cond_find_timeout(GSList *l, int cls)
{
- struct ofono_call_forwarding_condition *c;
-
- c = cf_cond_find(cf_list, cls);
-
- if (c == NULL)
- return DEFAULT_NO_REPLY_TIMEOUT;
+ struct ofono_call_forwarding_condition *cond = cf_cond_find(l, cls);
- return c->time;
+ return cond ? cond->time : DEFAULT_NO_REPLY_TIMEOUT;
}
static void cf_cond_list_print(GSList *l)
if (number[0] != '\0')
string_to_phone_number(number, &ph);
- timeout = cf_find_timeout(cf->cf_conditions[type], cls);
+ timeout = cf_cond_find_timeout(cf->cf_conditions[type], cls);
return set_property_request(cf, msg, type, cls, &ph,
timeout);