From 9220cce1627a9f37801a50ba0e5a351e6b7900b6 Mon Sep 17 00:00:00 2001 From: Jamie Bullock Date: Mon, 13 Dec 2010 16:45:10 +0000 Subject: - refactoring svn path=/trunk/externals/postlude/; revision=14628 --- pluginhost~/src/jsearch.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'pluginhost~/src/jsearch.c') diff --git a/pluginhost~/src/jsearch.c b/pluginhost~/src/jsearch.c index 593c6f5..5d69b1b 100644 --- a/pluginhost~/src/jsearch.c +++ b/pluginhost~/src/jsearch.c @@ -37,7 +37,7 @@ LADSPADirectoryPluginSearch (const char * pcDirectory, long iNeedSlash; struct dirent * psDirectoryEntry; void * pvPluginHandle; - int is_DSSI = 0; + bool is_DSSI = false; lDirLength = strlen(pcDirectory); if (!lDirLength) @@ -72,13 +72,15 @@ LADSPADirectoryPluginSearch (const char * pcDirectory, /* This is a file and the file is a shared library! */ dlerror(); - if(fDescriptorFunction = (DSSI_Descriptor_Function)dlsym(pvPluginHandle, - "ladspa_descriptor")) - is_DSSI = 0; - - else if(fDescriptorFunction = (DSSI_Descriptor_Function)dlsym(pvPluginHandle, - "dssi_descriptor")) - is_DSSI = 1; + if((fDescriptorFunction = + (DSSI_Descriptor_Function)dlsym(pvPluginHandle, + "ladspa_descriptor"))) { + is_DSSI = false; + } else if ((fDescriptorFunction = + (DSSI_Descriptor_Function)dlsym(pvPluginHandle, + "dssi_descriptor"))) { + is_DSSI = true; + } if (dlerror() == NULL && fDescriptorFunction) { /* We've successfully found a ladspa_descriptor function. Pass -- cgit v1.2.1