From 2e93940a86cc78228e8c0b1b7f469d817c6dc178 Mon Sep 17 00:00:00 2001 From: Thomas Graf Date: Sat, 21 Apr 2012 15:51:43 +0200 Subject: [PATCH] cache_mngr: Make providing the result pointer to nl_cache_mngr_add() optional --- lib/cache_mngr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/cache_mngr.c b/lib/cache_mngr.c index 15b545d..39cf0ac 100644 --- a/lib/cache_mngr.c +++ b/lib/cache_mngr.c @@ -169,7 +169,7 @@ errout: * @arg name Name of cache to keep track of * @arg cb Function to be called upon changes. * @arg data Argument passed on to change callback - * @arg result Pointer to store added cache. + * @arg result Pointer to store added cache (optional) * * Allocates a new cache of the specified type and adds it to the manager. * The operation will trigger a full dump request from the kernel to @@ -259,7 +259,8 @@ retry: NL_DBG(1, "Added cache %p <%s> to cache manager %p\n", cache, nl_cache_name(cache), mngr); - *result = cache; + if (result) + *result = cache; return 0; errout_drop_membership: -- 2.40.0