From: Jérémie Galarneau Date: Fri, 4 Mar 2016 16:59:38 +0000 (-0500) Subject: Clean-up: simplify computation of string position X-Git-Tag: v2.8.0-rc1~120 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=31e40170724289b547b191650191745ee535b237 Clean-up: simplify computation of string position Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng/commands/list.c b/src/bin/lttng/commands/list.c index bcada31cd..303f755fb 100644 --- a/src/bin/lttng/commands/list.c +++ b/src/bin/lttng/commands/list.c @@ -211,7 +211,6 @@ static char *get_exclusion_names_msg(struct lttng_event *event) int exclusion_count; char *exclusion_msg = NULL; char *at; - int count; size_t i; const char * const exclusion_fmt = " [exclusions: "; const size_t exclusion_fmt_len = strlen(exclusion_fmt); @@ -259,8 +258,7 @@ static char *get_exclusion_names_msg(struct lttng_event *event) } /* Append exclusion name */ - count = sprintf(at, "%s", name); - at += count; + at += sprintf(at, "%s", name); } /* This also puts a final '\0' at the end of exclusion_msg */