/*
This file is part of GNUnet
- (C) 2002-2013 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2002-2013 GNUnet e.V.
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
You should have received a copy of the GNU General Public License
along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
*/
/**
*/
static int initialized;
-
/**
* Libtool search path before we started.
*/
return;
}
opath = lt_dlgetsearchpath ();
- if (opath != NULL)
+ if (NULL != opath)
old_dlsearchpath = GNUNET_strdup (opath);
path = GNUNET_OS_installation_get_path (GNUNET_OS_IPK_LIBDIR);
- if (path != NULL)
+ if (NULL != path)
{
- if (opath != NULL)
+ if (NULL != opath)
{
GNUNET_asprintf (&cpath, "%s:%s", opath, path);
lt_dlsetsearchpath (cpath);
plugin_fini ()
{
lt_dlsetsearchpath (old_dlsearchpath);
- if (old_dlsearchpath != NULL)
+ if (NULL != old_dlsearchpath)
{
GNUNET_free (old_dlsearchpath);
old_dlsearchpath = NULL;
* @return NULL if the symbol was not found
*/
static GNUNET_PLUGIN_Callback
-resolve_function (struct PluginList *plug, const char *name)
+resolve_function (struct PluginList *plug,
+ const char *name)
{
char *initName;
void *mptr;
- GNUNET_asprintf (&initName, "_%s_%s", plug->name, name);
+ GNUNET_asprintf (&initName,
+ "_%s_%s",
+ plug->name,
+ name);
mptr = lt_dlsym (plug->handle, &initName[1]);
if (NULL == mptr)
mptr = lt_dlsym (plug->handle, initName);
plugins = pos->next;
else
prev->next = pos->next;
- // lt_dlclose (pos->handle);
+ lt_dlclose (pos->handle);
GNUNET_free (pos->name);
GNUNET_free (pos);
if (NULL == plugins)