Module: xenomai-3
Branch: next
Commit: ddcb4fac2efbb201803142a0af9f472d9dfa1087
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=ddcb4fac2efbb201803142a0af9f472d9dfa1087

Author: Jorge Ramirez-Ortiz <jorge.ramirez-or...@linaro.org>
Date:   Wed Oct  5 21:34:27 2016 +0200

utils/analogy: fix error check [SIGSEGV]

---

 utils/analogy/cmd_read.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/utils/analogy/cmd_read.c b/utils/analogy/cmd_read.c
index a507801..86522f4 100644
--- a/utils/analogy/cmd_read.c
+++ b/utils/analogy/cmd_read.c
@@ -261,12 +261,12 @@ static int map_subdevice_buffer(a4l_desc_t *dsc, unsigned 
long *buf_size, void *
 
 static int cmd_read(struct arguments *arg)
 {
-       unsigned int i, scan_size = 0, cnt = 0, ret = 0, len, ofs;
+       unsigned int i, scan_size = 0, cnt = 0, len, ofs;
        dump_function_t dump_function = dump_text;
        a4l_desc_t dsc = { .sbdata = NULL };
        unsigned long buf_size;
        char **argv = arg->argv;
-       int argc = arg->argc;
+       int ret = 0, argc = arg->argc;
        void *map = NULL;
 
        for (;;) {


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
https://xenomai.org/mailman/listinfo/xenomai-git

Reply via email to