2009-07-30 10:25:43

by Stoyan Gaydarov

[permalink] [raw]
Subject: [PATCH 4/4] [perf] fixed faulty check

This patche fixes a spelling error that has resulted from copy and pasting. The location of the error was found using a semantic patch but the semantic patch was not trying to find these errors. After looking things over it seemed logical that this change was needed. Please review it and then include the patch if it is in fact the correct change.

Signed-off-by: Stoyan Gaydarov <[email protected]>
---
tools/perf/util/symbol.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 2810605..b4fe057 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -565,7 +565,7 @@ static int dso__load_sym(struct dso *self, int fd, const char *name,
goto out_elf_end;

secstrs = elf_getdata(sec_strndx, NULL);
- if (symstrs == NULL)
+ if (secstrs == NULL)
goto out_elf_end;

nr_syms = shdr.sh_size / shdr.sh_entsize;
--
1.6.3.3


2009-07-30 10:48:20

by Peter Zijlstra

[permalink] [raw]
Subject: Re: [PATCH 4/4] [perf] fixed faulty check

On Thu, 2009-07-30 at 05:25 -0500, Stoyan Gaydarov wrote:
> This patche fixes a spelling error that has resulted from copy and
> pasting. The location of the error was found using a semantic patch
> but the semantic patch was not trying to find these errors. After
> looking things over it seemed logical that this change was needed.
> Please review it and then include the patch if it is in fact the
> correct change.

Looks sane to me. I'll pick it up. Thanks!

> Signed-off-by: Stoyan Gaydarov <[email protected]>
> ---
> tools/perf/util/symbol.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
> index 2810605..b4fe057 100644
> --- a/tools/perf/util/symbol.c
> +++ b/tools/perf/util/symbol.c
> @@ -565,7 +565,7 @@ static int dso__load_sym(struct dso *self, int fd, const char *name,
> goto out_elf_end;
>
> secstrs = elf_getdata(sec_strndx, NULL);
> - if (symstrs == NULL)
> + if (secstrs == NULL)
> goto out_elf_end;
>
> nr_syms = shdr.sh_size / shdr.sh_entsize;