summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Roskin <proski@gnu.org>2011-08-04 11:58:56 -0400
committerThomas Graf <tgraf@suug.ch>2011-08-11 14:49:51 +0200
commitf9993836ed0cb0359e486daa50f72c889f81a36a (patch)
treee04d5887f3ea4a4f5f9cb97f8e82b95477d8642c
parentf1c8d5b0a3a1baa87a773feb34866ca51e0989bb (diff)
downloadlibnl-f9993836ed0cb0359e486daa50f72c889f81a36a.tar.gz
Remove write-only variables in lib/cache.c
-rw-r--r--lib/cache.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/lib/cache.c b/lib/cache.c
index 3b453a9..90c0c0f 100644
--- a/lib/cache.c
+++ b/lib/cache.c
@@ -67,15 +67,12 @@ int nl_cache_nitems(struct nl_cache *cache)
*/
int nl_cache_nitems_filter(struct nl_cache *cache, struct nl_object *filter)
{
- struct nl_object_ops *ops;
struct nl_object *obj;
int nitems = 0;
if (cache->c_ops == NULL)
BUG();
- ops = cache->c_ops->co_obj_ops;
-
nl_list_for_each_entry(obj, &cache->c_items, ce_list) {
if (filter && !nl_object_match_filter(obj, filter))
continue;
@@ -271,7 +268,6 @@ struct nl_cache *nl_cache_subset(struct nl_cache *orig,
struct nl_object *filter)
{
struct nl_cache *cache;
- struct nl_object_ops *ops;
struct nl_object *obj;
if (!filter)
@@ -281,8 +277,6 @@ struct nl_cache *nl_cache_subset(struct nl_cache *orig,
if (!cache)
return NULL;
- ops = orig->c_ops->co_obj_ops;
-
nl_list_for_each_entry(obj, &orig->c_items, ce_list) {
if (!nl_object_match_filter(obj, filter))
continue;
@@ -941,13 +935,10 @@ void nl_cache_foreach_filter(struct nl_cache *cache, struct nl_object *filter,
void (*cb)(struct nl_object *, void *), void *arg)
{
struct nl_object *obj, *tmp;
- struct nl_object_ops *ops;
if (cache->c_ops == NULL)
BUG();
- ops = cache->c_ops->co_obj_ops;
-
nl_list_for_each_entry_safe(obj, tmp, &cache->c_items, ce_list) {
if (filter) {
int diff = nl_object_match_filter(obj, filter);