Skip to content
Snippets Groups Projects
Commit 7c491f9a authored by Danny Auble's avatar Danny Auble
Browse files

remove a bunch of whitespace from plugrack for easier to read code (from Mark Grondona)

parent 5059d293
No related branches found
No related tags found
No related merge requests found
...@@ -570,38 +570,38 @@ plugin_handle_t ...@@ -570,38 +570,38 @@ plugin_handle_t
plugrack_use_by_type( plugrack_t rack, plugrack_use_by_type( plugrack_t rack,
const char *full_type ) const char *full_type )
{ {
ListIterator it; ListIterator it;
plugrack_entry_t *e; plugrack_entry_t *e;
if ( ! rack ) if (!rack)
return PLUGIN_INVALID_HANDLE; return PLUGIN_INVALID_HANDLE;
if ( ! full_type ) if (!full_type)
return PLUGIN_INVALID_HANDLE; return PLUGIN_INVALID_HANDLE;
it = list_iterator_create( rack->entries ); it = list_iterator_create(rack->entries);
while ( ( e = list_next( it ) ) != NULL ) { while ((e = list_next(it))) {
if ( strcmp( full_type, e->full_type ) != 0 ) if (strcmp(full_type, e->full_type) != 0)
continue; continue;
/* See if plugin is loaded. */ /* See if plugin is loaded. */
if ( e->plug == PLUGIN_INVALID_HANDLE ) if (e->plug == PLUGIN_INVALID_HANDLE)
plugin_load_from_file(&e->plug, e->fq_path); plugin_load_from_file(&e->plug, e->fq_path);
/* If load was successful, increment the reference count. */ /* If load was successful, increment the reference count. */
if ( e->plug == PLUGIN_INVALID_HANDLE ) if (e->plug == PLUGIN_INVALID_HANDLE )
e->refcount++; e->refcount++;
/* /*
* Return the plugin, even if it failed to load -- this serves * Return the plugin, even if it failed to load -- this serves
* as an error return value. * as an error return value.
*/ */
list_iterator_destroy( it ); list_iterator_destroy(it);
return e->plug; return e->plug;
} }
/* Couldn't find a suitable plugin. */ /* Couldn't find a suitable plugin. */
list_iterator_destroy( it ); list_iterator_destroy(it);
return PLUGIN_INVALID_HANDLE; return PLUGIN_INVALID_HANDLE;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment