]> git.sur5r.net Git - openocd/commitdiff
usbtoxxx: remove warning by reducing scope of variable
authorØyvind Harboe <oyvind.harboe@zylin.com>
Tue, 1 Nov 2011 21:59:17 +0000 (22:59 +0100)
committerSpencer Oliver <spen@spen-soft.co.uk>
Wed, 2 Nov 2011 09:42:34 +0000 (09:42 +0000)
Change-Id: Icc3cfe601082cd83ad1c8818c1e21e7ada014150
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/154
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
src/jtag/drivers/versaloon/usbtoxxx/usbtoxxx.c

index 64e31a6552cdf7b9fce81747714e0dce9f344524..f92f38c9daa3691eb24288c71b68a4b248d83285 100644 (file)
@@ -199,9 +199,9 @@ RESULT usbtoxxx_execute_command(void)
                        }
                        if (!processed)
                        {
-                               struct versaloon_want_pos_t *tmp, *free_tmp;
+                               struct versaloon_want_pos_t *tmp;
                                
-                               free_tmp = tmp = versaloon_pending[i].pos;
+                               tmp = versaloon_pending[i].pos;
                                while (tmp != NULL)
                                {
                                        if ((tmp->buff != NULL) && (tmp->size > 0))
@@ -209,6 +209,7 @@ RESULT usbtoxxx_execute_command(void)
                                                memcpy(tmp->buff, versaloon_buf + usbtoxxx_buffer_index
                                                        + tmp->offset, tmp->size);
                                        }
+                                       struct versaloon_want_pos_t *free_tmp;
                                        free_tmp = tmp;
                                        tmp = tmp->next;
                                        free(free_tmp);