Logo Search packages:      
Sourcecode: libnl version File versions  Download package

struct nl_cache* nl_cache_alloc ( void   )  [read]

Allocate an empty cache of no certain type

Returns:
A newly allocated and initialized cache.

Definition at line 167 of file cache.c.

Referenced by nl_cache_alloc_from_ops().

{
      struct nl_cache *cache;

      cache = calloc(1, sizeof(*cache));
      if (!cache) {
            nl_errno(ENOMEM);
            return NULL;
      }

      nl_init_list_head(&cache->c_items);

      return cache;
}


Generated by  Doxygen 1.6.0   Back to index