aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2011-06-21 00:57:08 +0200
committerDaniel Lezcano <daniel.lezcano@linaro.org>2011-06-21 00:57:08 +0200
commit528bb3f1bed14700793bb758be43f446e16a00c0 (patch)
tree930d31bfa80b6484aa9c8e2f4cd4bfbadea7e388
parent96a64fb892e21e6f49e5b03a34bacfc54e82cb2c (diff)
downloadpowerdebug-528bb3f1bed14700793bb758be43f446e16a00c0.tar.gz
tree should not return a result when we pass an empty string
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
-rw-r--r--tree.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tree.c b/tree.c
index f95610a..aefe0fe 100644
--- a/tree.c
+++ b/tree.c
@@ -304,6 +304,9 @@ static int tree_finds_cb(struct tree *tree, void *data)
{
struct struct_find *sf = data;
+ if (!strlen(sf->name))
+ return 0;
+
if (strncmp(sf->name, tree->name, strlen(sf->name)))
return 0;