projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
threshold plugin: Fix "Dead assignment" warnings.
[collectd.git]
/
src
/
plugin.c
diff --git
a/src/plugin.c
b/src/plugin.c
index
6c7aa05
..
cb1005e
100644
(file)
--- a/
src/plugin.c
+++ b/
src/plugin.c
@@
-339,7
+339,7
@@
static int plugin_load_file (char *file, uint32_t flags)
ssnprintf (errbuf, sizeof (errbuf),
"lt_dlopen (\"%s\") failed: %s. "
ssnprintf (errbuf, sizeof (errbuf),
"lt_dlopen (\"%s\") failed: %s. "
- "The most common cause for this problem
are
"
+ "The most common cause for this problem
is
"
"missing dependencies. Use ldd(1) to check "
"the dependencies of the plugin "
"/ shared object.",
"missing dependencies. Use ldd(1) to check "
"the dependencies of the plugin "
"/ shared object.",
@@
-895,7
+895,6
@@
int plugin_load (char const *plugin_name, uint32_t flags)
const char *dir;
char filename[BUFSIZE] = "";
char typename[BUFSIZE];
const char *dir;
char filename[BUFSIZE] = "";
char typename[BUFSIZE];
- int typename_len;
int ret;
struct stat statbuf;
struct dirent *de;
int ret;
struct stat statbuf;
struct dirent *de;
@@
-935,7
+934,6
@@
int plugin_load (char const *plugin_name, uint32_t flags)
WARNING ("plugin_load: Filename too long: \"%s.so\"", plugin_name);
return (-1);
}
WARNING ("plugin_load: Filename too long: \"%s.so\"", plugin_name);
return (-1);
}
- typename_len = strlen (typename);
if ((dh = opendir (dir)) == NULL)
{
if ((dh = opendir (dir)) == NULL)
{
@@
-947,7
+945,7
@@
int plugin_load (char const *plugin_name, uint32_t flags)
while ((de = readdir (dh)) != NULL)
{
while ((de = readdir (dh)) != NULL)
{
- if (str
ncasecmp (de->d_name, typename, typename_len
))
+ if (str
casecmp (de->d_name, typename
))
continue;
status = ssnprintf (filename, sizeof (filename),
continue;
status = ssnprintf (filename, sizeof (filename),