From: Simon Marchi Date: Wed, 31 Mar 2021 18:56:14 +0000 (-0400) Subject: Clean-up: lttng: fix -Wshadow error in cmd_snapshot X-Git-Tag: v2.13.0-rc1~127 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=38250272a0ab47aad1b93b15641df77abd658c81;p=lttng-tools.git Clean-up: lttng: fix -Wshadow error in cmd_snapshot ... by renaming a local variable. Change-Id: If0aeb5adc71a0cc72efa60582df5447e12ad74d0 Signed-off-by: Simon Marchi Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng/commands/snapshot.c b/src/bin/lttng/commands/snapshot.c index 22531e8f2..8f44b9f1c 100644 --- a/src/bin/lttng/commands/snapshot.c +++ b/src/bin/lttng/commands/snapshot.c @@ -624,10 +624,10 @@ int cmd_snapshot(int argc, const char **argv) case OPT_MAX_SIZE: { uint64_t val; - const char *opt = poptGetOptArg(pc); + const char *optarg = poptGetOptArg(pc); - if (utils_parse_size_suffix((char *) opt, &val) < 0) { - ERR("Unable to handle max-size value %s", opt); + if (utils_parse_size_suffix((char *) optarg, &val) < 0) { + ERR("Unable to handle max-size value %s", optarg); cmd_ret = CMD_ERROR; goto end; }