From fb8b15e776fb02e8f99886092c869a603f1460cb Mon Sep 17 00:00:00 2001 From: Sylwester Nawrocki Date: Thu, 9 Jul 2015 15:54:47 +0200 Subject: v4l2-mfc-example: Whitespace cleanup Signed-off-by: Mateusz Krawczuk --- v4l2-mfc-example/args.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/v4l2-mfc-example/args.c b/v4l2-mfc-example/args.c index a6a5e08..9563dad 100644 --- a/v4l2-mfc-example/args.c +++ b/v4l2-mfc-example/args.c @@ -90,18 +90,18 @@ int detect_video(struct instance *i) printf("Name:\t\t '%s'\n", buf); if (!strcmp("fimc.0.m2m", buf)) { - i->fimc.name=(char *) malloc(100); - strcpy(i->fimc.name, dev_prefix); - ndigits = strlen(gb.gl_pathv[g]) - sizeof "/sys/class/video4linux/video/name" + 1; - strncat(i->fimc.name, gb.gl_pathv[g] + sizeof "/sys/class/video4linux/video" - 1, ndigits); - printf("Name:\t\t '%s'\n", i->fimc.name); + i->fimc.name=(char *) malloc(100); + strcpy(i->fimc.name, dev_prefix); + ndigits = strlen(gb.gl_pathv[g]) - sizeof "/sys/class/video4linux/video/name" + 1; + strncat(i->fimc.name, gb.gl_pathv[g] + sizeof "/sys/class/video4linux/video" - 1, ndigits); + printf("Name:\t\t '%s'\n", i->fimc.name); } if (!strcmp("s5p-mfc-dec", buf)) { - i->mfc.name=(char *) malloc(100); - strcpy(i->mfc.name, dev_prefix); - ndigits = strlen(gb.gl_pathv[g]) - sizeof "/sys/class/video4linux/video/name" + 1; - strncat(i->mfc.name, gb.gl_pathv[g] + sizeof "/sys/class/video4linux/video" - 1, ndigits); - printf("Name:\t\t '%s'\n", i->mfc.name); + i->mfc.name=(char *) malloc(100); + strcpy(i->mfc.name, dev_prefix); + ndigits = strlen(gb.gl_pathv[g]) - sizeof "/sys/class/video4linux/video/name" + 1; + strncat(i->mfc.name, gb.gl_pathv[g] + sizeof "/sys/class/video4linux/video" - 1, ndigits); + printf("Name:\t\t '%s'\n", i->mfc.name); } } @@ -116,10 +116,6 @@ finish: } - - - - void init_to_defaults(struct instance *i) { memset(i, 0, sizeof(*i)); -- cgit v1.2.3