Allocate an empty cache
Definition at line 173 of file cache.c. Referenced by flnl_result_alloc_cache(), nl_cache_alloc_name(), nl_cache_mngr_add(), nl_cache_subset(), rtnl_class_alloc_cache(), rtnl_cls_alloc_cache(), rtnl_route_alloc_cache(), and rtnl_rule_alloc_cache(). { struct nl_cache *cache; cache = calloc(1, sizeof(*cache)); if (!cache) return NULL; nl_init_list_head(&cache->c_items); cache->c_ops = ops; NL_DBG(2, "Allocated cache %p <%s>.\n", cache, nl_cache_name(cache)); return cache; }
|