X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fplugin.c;h=489d0f70c948dd9129dc5156867741412c047b2f;hb=82e27678f8972d2625b466e7e7ba9daaa6395c98;hp=d3767d1283b9678bec65e8665d5feb7b8c64bef7;hpb=96e0f2341bace029acefe0a88bab96ae326c0ff5;p=collectd.git diff --git a/src/plugin.c b/src/plugin.c index d3767d12..489d0f70 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -332,7 +332,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.", @@ -837,7 +837,6 @@ int plugin_load (const char *type, uint32_t flags) const char *dir; char filename[BUFSIZE] = ""; char typename[BUFSIZE]; - int typename_len; int ret; struct stat statbuf; struct dirent *de; @@ -854,7 +853,6 @@ int plugin_load (const char *type, uint32_t flags) WARNING ("plugin_load: Filename too long: \"%s.so\"", type); return (-1); } - typename_len = strlen (typename); if ((dh = opendir (dir)) == NULL) { @@ -866,7 +864,7 @@ int plugin_load (const char *type, 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),