diff mbox

[powerdebug,16/17] tree should not return a result when we pass an empty string

Message ID 1308610705-23281-16-git-send-email-daniel.lezcano@linaro.org
State Accepted
Headers show

Commit Message

Daniel Lezcano June 20, 2011, 10:58 p.m. UTC
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 tree.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff mbox

Patch

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;