From 31e40170724289b547b191650191745ee535b237 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Fri, 4 Mar 2016 11:59:38 -0500 Subject: [PATCH] Clean-up: simplify computation of string position MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- src/bin/lttng/commands/list.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 */ -- 2.34.1