diff options
author | Daniel Lezcano <daniel.lezcano@linaro.org> | 2011-06-21 00:57:08 +0200 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2011-06-21 00:57:08 +0200 |
commit | 528bb3f1bed14700793bb758be43f446e16a00c0 (patch) | |
tree | 930d31bfa80b6484aa9c8e2f4cd4bfbadea7e388 | |
parent | 96a64fb892e21e6f49e5b03a34bacfc54e82cb2c (diff) | |
download | powerdebugV2-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.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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; |