X-Git-Url: https://git.octo.it/?a=blobdiff_plain;ds=inline;f=src%2Fdaemon%2Fcollectd.c;h=2576789cf582704ef58080567f585d31cbe538d6;hb=e88be91ffc1d4ea252f19d5c126390285bd0917e;hp=6f299174ad8ea38af32fc630d47f208905864dea;hpb=43ef00c0eb99991902d3c9a5fbe582cde049b055;p=collectd.git diff --git a/src/daemon/collectd.c b/src/daemon/collectd.c index 6f299174..2576789c 100644 --- a/src/daemon/collectd.c +++ b/src/daemon/collectd.c @@ -196,7 +196,7 @@ static int change_basedir (const char *orig_dir) while ((dirlen > 0) && (dir[dirlen - 1] == '/')) dir[--dirlen] = '\0'; - if (dirlen <= 0) { + if (dirlen == 0) { free (dir); return (-1); }