pahole: Fix structures__find, tfind returns a pointer, not the object we want

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Arnaldo Carvalho de Melo 2008-11-03 14:47:56 -02:00
parent adb9d370d6
commit bcf1c15d8b
1 changed files with 4 additions and 2 deletions

View File

@ -165,9 +165,11 @@ static struct structure *structures__find(strings_t name)
struct structure *s = NULL;
if (name) {
s = tfind(&name, &structures__tree, structure__compare);
struct structure **key = tfind(&name, &structures__tree, structure__compare);
if (!s && class__include_anonymous)
if (key != NULL)
s = *key;
else if (class__include_anonymous)
s = structures__find_anonymous(name);
}