X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fplugin.c;h=cb1005e8dffaa0537737183d338fc7278040fd3e;hb=dd324a1592259913e6e92d3b54e6fa2b0c5f38f7;hp=6c7aa057cf2d272b126eadf6308a76188d3f3b1a;hpb=13cd1495b95cb1cbebcbf6abebc171ebcddc192c;p=collectd.git diff --git a/src/plugin.c b/src/plugin.c index 6c7aa057..cb1005e8 100644 --- 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. " - "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.", @@ -895,7 +895,6 @@ int plugin_load (char const *plugin_name, uint32_t flags) const char *dir; char filename[BUFSIZE] = ""; char typename[BUFSIZE]; - int typename_len; 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); } - typename_len = strlen (typename); if ((dh = opendir (dir)) == NULL) { @@ -947,7 +945,7 @@ int plugin_load (char const *plugin_name, uint32_t flags) while ((de = readdir (dh)) != NULL) { - if (strncasecmp (de->d_name, typename, typename_len)) + if (strcasecmp (de->d_name, typename)) continue; status = ssnprintf (filename, sizeof (filename),