summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodor Tomov <ttomov@mm-sol.com>2010-06-24 11:02:27 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2010-07-01 10:47:59 +0200
commiteffca90834223bd1d9542cd4f1c6fbcc6e4b3d04 (patch)
treeb831f8a2b3f4f2dedf0acc5040213223fbdcb952
parent7bb54a6e388c5f116c60f9fa7ef053e2dc935fcb (diff)
main.c: fix spaces check in parse_pad()
Check for spaces before colon also when entity is numeric. Signed-off-by: Todor Tomov <ttomov@mm-sol.com>
-rw-r--r--main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/main.c b/main.c
index 96b7ca1..62277b0 100644
--- a/main.c
+++ b/main.c
@@ -61,13 +61,14 @@ static struct media_entity_pad *parse_pad(struct media_device *media, const char
if (entity == NULL)
return NULL;
- for (++end; isspace(*end); ++end);
+ ++end;
} else {
entity_id = strtoul(p, &end, 10);
entity = media_get_entity_by_id(media, entity_id);
if (entity == NULL)
return NULL;
}
+ for (; isspace(*end); ++end);
if (*end != ':')
return NULL;