From 4cb80427fe04b7bdd60001553d890aedd6f77850 Mon Sep 17 00:00:00 2001 From: Blair Bonnett Date: Fri, 17 Aug 2012 23:21:52 +1200 Subject: [PATCH] get_user_list() - use assert to check credential level. --- src/core/plugincallback.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/core/plugincallback.c b/src/core/plugincallback.c index 4f23f65..573ec0f 100644 --- a/src/core/plugincallback.c +++ b/src/core/plugincallback.c @@ -217,11 +217,7 @@ static struct linked_list* cbfunc_get_user_list(struct plugin_handle* plugin, en } /* Check the credential level is valid. */ - if(credentials > auth_cred_admin) - { - plugin->error_msg = "Invalid credential level in get_user_list"; - return NULL; - } + uhub_assert(credentials <= auth_cred_admin); /* Get the master user list and prepare our copy. */ struct hub_info* hub = plugin_get_hub(plugin);