From 9451dd777d3adb37e51f34a48f772e66d54b1f85 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sat, 29 Mar 2008 09:57:13 +0100 Subject: [PATCH] src/utils_ignorelist.c: ignorelist_match: Allow the `ignorelist' to be NULL. This makes calling the function easier, because initialization of the ignorelist in the plugin usually depends on configuration parameters.. --- src/utils_ignorelist.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils_ignorelist.c b/src/utils_ignorelist.c index 94d6bdae..1d9467fe 100644 --- a/src/utils_ignorelist.c +++ b/src/utils_ignorelist.c @@ -1,6 +1,7 @@ /** * collectd - src/utils_ignorelist.c * Copyright (C) 2006 Lubos Stanek + * Copyright (C) 2008 Florian Forster * * This program is free software; you can redistribute it and/ * or modify it under the terms of the GNU General Public Li- @@ -19,6 +20,7 @@ * * Authors: * Lubos Stanek + * Florian Forster **/ /** * ignorelist handles plugin's list of configured collectable @@ -332,10 +334,8 @@ int ignorelist_match (ignorelist_t *il, const char *entry) { ignorelist_item_t *traverse; - assert (il != NULL); - /* if no entries, collect all */ - if (il->head == NULL) + if ((il == NULL) || (il->head == NULL)) return (0); if ((entry == NULL) || (strlen (entry) == 0)) -- 2.11.0