From: Jérémie Galarneau Date: Wed, 6 May 2015 15:51:50 +0000 (-0400) Subject: Clean-up append_list_to_probes() X-Git-Tag: v2.7.0-rc1~33 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=d3c04b7c1cbb447e82858125c64c4f69160d8023;p=lttng-tools.git Clean-up append_list_to_probes() Remove unecessary "index" variable and cur_mod increment which was probably meant to increment "index", a bug fixed by 9ae17e2. Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/modprobe.c b/src/bin/lttng-sessiond/modprobe.c index 32c421013..a7cbab287 100644 --- a/src/bin/lttng-sessiond/modprobe.c +++ b/src/bin/lttng-sessiond/modprobe.c @@ -359,7 +359,7 @@ static int grow_probes(void) static int append_list_to_probes(const char *list) { char *next; - int index = nr_probes, ret; + int ret; char *tmp_list, *cur_list; assert(list); @@ -395,7 +395,7 @@ static int append_list_to_probes(const char *list) /* Length 13 is "lttng-probe-" + \0 */ name_len = strlen(next) + 13; - cur_mod = &probes[index++]; + cur_mod = &probes[nr_probes]; cur_mod->name = zmalloc(name_len); if (!cur_mod->name) { PERROR("malloc probe list"); @@ -410,7 +410,6 @@ static int append_list_to_probes(const char *list) goto error; } - cur_mod++; nr_probes++; }