]> git.sur5r.net Git - openocd/commitdiff
another portability update
authorDavid Brownell <dbrownell@users.sourceforge.net>
Thu, 15 Oct 2009 03:24:31 +0000 (20:24 -0700)
committerDavid Brownell <dbrownell@users.sourceforge.net>
Thu, 15 Oct 2009 03:24:31 +0000 (20:24 -0700)
Just use "%p" instead of consing up some integral type for pointer printf.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
src/flash/mflash.c

index 208125ed916e86208b9ed05d2cf7abcc978be190..63ba054ab73a612e751f839c69ca980e963981e5 100644 (file)
@@ -474,8 +474,8 @@ static int mg_mflash_read_sects(void *buff, uint32_t sect_num, uint32_t sect_cnt
        residue = sect_cnt % 256;
 
        for (i = 0; i < quotient; i++) {
-               LOG_DEBUG("mflash: sect num : %" PRIu32 " buff : 0x%0lx", sect_num,
-                       (unsigned long)buff_ptr);
+               LOG_DEBUG("mflash: sect num : %" PRIu32 " buff : %p",
+                               sect_num, buff_ptr);
                ret = mg_mflash_do_read_sects(buff_ptr, sect_num, 256);
                if (ret != ERROR_OK)
                        return ret;
@@ -485,8 +485,8 @@ static int mg_mflash_read_sects(void *buff, uint32_t sect_num, uint32_t sect_cnt
        }
 
        if (residue) {
-               LOG_DEBUG("mflash: sect num : %" PRIx32 " buff : %0lx", sect_num,
-                       (unsigned long)buff_ptr);
+               LOG_DEBUG("mflash: sect num : %" PRIx32 " buff : %p",
+                               sect_num, buff_ptr);
                return mg_mflash_do_read_sects(buff_ptr, sect_num, residue);
        }