Code

src/filter_chain.c: Allow chains without a default target.
[collectd.git] / src / configfile.c
index 0f49de266f643929632895ca4d76b7630732bb60..bb1770d2ab13e8c8a26c84901dd9e012dd0fc9a7 100644 (file)
@@ -555,7 +555,7 @@ static oconfig_item_t *cf_read_dir (const char *dir, int depth)
 
                status = ssnprintf (name, sizeof (name), "%s/%s",
                                dir, de->d_name);
-               if (status >= sizeof (name))
+               if ((status < 0) || ((size_t) status >= sizeof (name)))
                {
                        ERROR ("configfile: Not including `%s/%s' because its"
                                        " name is too long.",
@@ -630,7 +630,7 @@ static oconfig_item_t *cf_read_generic (const char *path, int depth)
        int status;
        const char *path_ptr;
        wordexp_t we;
-       int i;
+       size_t i;
 
        if (depth >= CF_MAX_DEPTH)
        {