diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2010-03-22 21:43:46 -0700 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-03-22 21:43:46 -0700 |
commit | b4267dc624dab967fd71c311158aae9e5640ae83 (patch) | |
tree | 0e785c66ef47daf0c9e834cc6c02d44c9334d42c /gatchat | |
parent | 39476a2b54d4cdeb654d5e6a4b523df6ed7c10a1 (diff) | |
download | ofono-b4267dc624dab967fd71c311158aae9e5640ae83.tar.bz2 |
Remove pointless optimization attempt with g_list_length()
Diffstat (limited to 'gatchat')
-rw-r--r-- | gatchat/ppp_cp.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/gatchat/ppp_cp.c b/gatchat/ppp_cp.c index 7cbcdcb3..e8d6e309 100644 --- a/gatchat/ppp_cp.c +++ b/gatchat/ppp_cp.c @@ -312,8 +312,7 @@ static void pppcp_send_configure_ack(struct pppcp_data *data, /* copy the applied options in. */ odata = packet->data; - if (g_list_length(data->acceptable_options)) - g_list_foreach(data->acceptable_options, copy_option, &odata); + g_list_foreach(data->acceptable_options, copy_option, &odata); /* match identifier of the request */ packet->identifier = pppcp_header->identifier; @@ -1068,9 +1067,6 @@ static void verify_config_option(gpointer elem, gpointer user_data) * determine whether this config option is in the * acceptable options list */ - if (g_list_length(data->acceptable_options) == 0) - return; - list = g_list_find_custom(data->acceptable_options, GUINT_TO_POINTER(type), is_option); if (list) @@ -1102,9 +1098,6 @@ static void remove_config_option(gpointer elem, gpointer user_data) * determine whether this config option is in the * applied options list */ - if (g_list_length(data->config_options) == 0) - return; - list = g_list_find_custom(data->config_options, GUINT_TO_POINTER(type), is_option); if (!list) |