X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcollectdctl.c;h=8ca0559d0728eebf5dafabb57fb0c47e556e29aa;hb=13c83b972a8ade7dff6f8f2d00832d446ef6f502;hp=febc99833aaa917f084e4d606e34a84c70b90fb4;hpb=b758f3b7146f1497d93e1df64cbc0c14ae164768;p=collectd.git diff --git a/src/collectdctl.c b/src/collectdctl.c index febc9983..8ca0559d 100644 --- a/src/collectdctl.c +++ b/src/collectdctl.c @@ -72,6 +72,7 @@ extern char *optarg; extern int optind; +__attribute__((noreturn)) static void exit_usage (const char *name, int status) { fprintf ((status == 0) ? stdout : stderr, "Usage: %s [options] [cmd options]\n\n" @@ -193,7 +194,6 @@ static int getval (lcc_connection_t *c, int argc, char **argv) return (-1); } - memset (&ident, 0, sizeof (ident)); status = parse_identifier (c, argv[1], &ident); if (status != 0) return (status); @@ -482,7 +482,7 @@ static int putval (lcc_connection_t *c, int argc, char **argv) values_len = 0; value = tmp; - while (value != 0) { + while (value != NULL) { char *dot, *endptr; tmp = strchr (value, (int)':'); @@ -565,7 +565,6 @@ int main (int argc, char **argv) { break; case 'h': exit_usage (argv[0], 0); - break; default: exit_usage (argv[0], 1); }