X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcollectdctl.c;h=478f2a4b4172d77079bee5aeecef15c78bd396f8;hb=f0b9430b0c0f45ada6f655dd4b9c64a8cbdf8d66;hp=3bd8f0410f846ddf21130bf93ac8059555a7c269;hpb=59c7ee1cafaf53814838794908dd84f8101334c7;p=collectd.git diff --git a/src/collectdctl.c b/src/collectdctl.c index 3bd8f041..478f2a4b 100644 --- a/src/collectdctl.c +++ b/src/collectdctl.c @@ -65,7 +65,7 @@ # endif #endif /* NAN_ZERO_ZERO */ -#include "libcollectdclient/client.h" +#include "libcollectdclient/collectd/client.h" #define DEFAULT_SOCK LOCALSTATEDIR"/run/"PACKAGE_NAME"-unixsock" @@ -485,7 +485,7 @@ static int putval (lcc_connection_t *c, int argc, char **argv) while (value != 0) { char *dot, *endptr; - tmp = strchr (argv[i], (int)':'); + tmp = strchr (value, (int)':'); if (tmp != NULL) { *tmp = '\0'; @@ -551,14 +551,14 @@ int main (int argc, char **argv) { int status; while (42) { - int c; + int n; - c = getopt (argc, argv, "s:h"); + n = getopt (argc, argv, "s:h"); - if (c == -1) + if (n == -1) break; - switch (c) { + switch (n) { case 's': snprintf (address, sizeof (address), "unix:%s", optarg); address[sizeof (address) - 1] = '\0';