From: Mathieu Desnoyers Date: Wed, 22 Jan 2014 19:48:28 +0000 (-0500) Subject: health check: change --relayd-path arg to --relayd-path=arg X-Git-Tag: v2.5.0-rc1~256 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=bd38113f66205c49b32089827730f70095fcea86;p=lttng-tools.git health check: change --relayd-path arg to --relayd-path=arg Signed-off-by: Mathieu Desnoyers --- diff --git a/tests/regression/tools/health/health_check.c b/tests/regression/tools/health/health_check.c index fbf45c813..dc975de99 100644 --- a/tests/regression/tools/health/health_check.c +++ b/tests/regression/tools/health/health_check.c @@ -137,14 +137,12 @@ int main(int argc, char *argv[]) int status = 0, i; for (i = 1; i < argc; i++) { - if (!strcmp(argv[i], "--relayd-path")) { - if (i >= argc - 1) { - fprintf(stderr, "Missing relayd path\n"); - exit(EXIT_FAILURE); - } - relayd_path = argv[++i]; + size_t relayd_path_arg_len = strlen("--relayd-path="); + if (!strncmp(argv[i], "--relayd-path=", + relayd_path_arg_len)) { + relayd_path = &argv[i][relayd_path_arg_len]; } else { - fprintf(stderr, "Unknown option \"%s\". Try --relayd-path PATH.\n", argv[i]); + fprintf(stderr, "Unknown option \"%s\". Try --relayd-path=PATH.\n", argv[i]); exit(EXIT_FAILURE); } }