diff options
author | Arkadiusz Nowak <a.nowak3@samsung.com> | 2022-07-20 13:44:47 +0200 |
---|---|---|
committer | Arkadiusz Nowak <a.nowak3@samsung.com> | 2022-07-21 06:08:13 +0200 |
commit | 485ded446c92c244fce9c66d95b09a2971d3e74a (patch) | |
tree | 3442bce5bf87f8b16638d01e726573adc3d2f778 | |
parent | 532c26edfb0e1d81f268d63d4dc227edd5a5f041 (diff) | |
download | sessiond-485ded446c92c244fce9c66d95b09a2971d3e74a.tar.gz sessiond-485ded446c92c244fce9c66d95b09a2971d3e74a.tar.bz2 sessiond-485ded446c92c244fce9c66d95b09a2971d3e74a.zip |
removed unecessary NULL case
Change-Id: I8ebbb85f323bb68c8a7efb703505d647540f0ee6
-rw-r--r-- | libsessiond/src/lib.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libsessiond/src/lib.c b/libsessiond/src/lib.c index 25b7495..f034d69 100644 --- a/libsessiond/src/lib.c +++ b/libsessiond/src/lib.c @@ -388,9 +388,6 @@ static signal_client_data_t *take_from_callbacks_data_and_remove_from_list( clie signal_client_data_t *signal_data = NULL; g_mutex_lock(&client_callbacks_data->mutex); - if (client_callbacks_data->list == NULL) { - return NULL; - } GList *found_data = g_list_find_custom( client_callbacks_data->list, (gconstpointer) parameters, compare_user_params ); if (found_data != NULL && found_data->data != NULL) { signal_data = (signal_client_data_t*)found_data->data; @@ -407,7 +404,7 @@ static signal_client_data_t *find_in_callbacks_data( client_callbacks_data_t *cl g_mutex_lock(&client_callbacks_data->mutex); GList *found_data = g_list_find_custom( client_callbacks_data->list, (gconstpointer) parameters, compare_user_params ); - if (found_data != NULL) { + if (found_data != NULL && found_data->data != NULL) { signal_data = (signal_client_data_t*)found_data->data; } g_mutex_unlock(&client_callbacks_data->mutex); |