projects
/
oweals
/
gnunet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add crc8
[oweals/gnunet.git]
/
src
/
util
/
plugin.c
diff --git
a/src/util/plugin.c
b/src/util/plugin.c
index a1a8aa681d0c4896a9fafcfdf9fbf12b950071af..b91c88eacd9edcb00d9ba1778452885c396723a8 100644
(file)
--- a/
src/util/plugin.c
+++ b/
src/util/plugin.c
@@
-1,6
+1,6
@@
/*
This file is part of GNUnet
/*
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
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
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., 5
9 Temple Place - Suite 330
,
- Boston, MA 0211
1-1307
, USA.
+ Free Software Foundation, Inc., 5
1 Franklin Street, Fifth Floor
,
+ Boston, MA 0211
0-1301
, USA.
*/
/**
*/
/**
@@
-57,7
+57,6
@@
struct PluginList
*/
static int initialized;
*/
static int initialized;
-
/**
* Libtool search path before we started.
*/
/**
* Libtool search path before we started.
*/
@@
-89,12
+88,12
@@
plugin_init ()
return;
}
opath = lt_dlgetsearchpath ();
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);
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);
{
GNUNET_asprintf (&cpath, "%s:%s", opath, path);
lt_dlsetsearchpath (cpath);
@@
-117,7
+116,7
@@
static void
plugin_fini ()
{
lt_dlsetsearchpath (old_dlsearchpath);
plugin_fini ()
{
lt_dlsetsearchpath (old_dlsearchpath);
- if (
old_dlsearchpath != NULL
)
+ if (
NULL != old_dlsearchpath
)
{
GNUNET_free (old_dlsearchpath);
old_dlsearchpath = NULL;
{
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
* @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;
{
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);
mptr = lt_dlsym (plug->handle, &initName[1]);
if (NULL == mptr)
mptr = lt_dlsym (plug->handle, initName);