This is an automated email from Gerrit.

Andreas Fritiofson (andreas.fritiof...@gmail.com) just uploaded a new patch set 
to Gerrit, which you can find at http://openocd.zylin.com/1640

-- gerrit

commit 6755b3d7162eb3bddfd92ba39e7dcfd77690547d
Author: Andreas Fritiofson <andreas.fritiof...@gmail.com>
Date:   Fri Sep 20 23:06:24 2013 +0200

    target: Fix strange ordering in target_read_u8
    
    It's been like this since the check was added, in 5aa93a5e.
    
    Change-Id: Iaa0586e0cd1ce57ad92735dcc3e51108a133fe96
    Signed-off-by: Andreas Fritiofson <andreas.fritiof...@gmail.com>

diff --git a/src/target/target.c b/src/target/target.c
index 9cc94f3..4fd9fff 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -2031,12 +2031,13 @@ int target_read_u16(struct target *target, uint32_t 
address, uint16_t *value)
 
 int target_read_u8(struct target *target, uint32_t address, uint8_t *value)
 {
-       int retval = target_read_memory(target, address, 1, 1, value);
        if (!target_was_examined(target)) {
                LOG_ERROR("Target not examined yet");
                return ERROR_FAIL;
        }
 
+       int retval = target_read_memory(target, address, 1, 1, value);
+
        if (retval == ERROR_OK) {
                LOG_DEBUG("address: 0x%8.8" PRIx32 ", value: 0x%2.2x",
                                  address,

-- 

------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to