X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Futil%2Fplugin.c;h=b91c88eacd9edcb00d9ba1778452885c396723a8;hb=71e181512d1cd61d3865f93f5b85b208b5720ba5;hp=a1a8aa681d0c4896a9fafcfdf9fbf12b950071af;hpb=cd5b48f92d07facc4227cbe1485df63340d06df5;p=oweals%2Fgnunet.git diff --git a/src/util/plugin.c b/src/util/plugin.c index a1a8aa681..b91c88eac 100644 --- a/src/util/plugin.c +++ b/src/util/plugin.c @@ -1,6 +1,6 @@ /* This file is part of GNUnet - (C) 2002-2013 Christian Grothoff (and other contributing authors) + Copyright (C) 2002-2013 Christian Grothoff (and other contributing authors) GNUnet is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published @@ -14,8 +14,8 @@ 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. */ /** @@ -57,7 +57,6 @@ struct PluginList */ static int initialized; - /** * Libtool search path before we started. */ @@ -89,12 +88,12 @@ plugin_init () 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); @@ -117,7 +116,7 @@ static void plugin_fini () { lt_dlsetsearchpath (old_dlsearchpath); - if (old_dlsearchpath != NULL) + if (NULL != old_dlsearchpath) { GNUNET_free (old_dlsearchpath); old_dlsearchpath = NULL; @@ -134,12 +133,16 @@ plugin_fini () * @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);