OSDN Git Service

[ 2815739 ] Fix fwrite call (Jochen Friedrich)
authorarniml <arniml@b68d4a1b-bc3d-0410-92ed-d4ac073336b7>
Wed, 15 Jul 2009 17:48:57 +0000 (17:48 +0000)
committerarniml <arniml@b68d4a1b-bc3d-0410-92ed-d4ac073336b7>
Wed, 15 Jul 2009 17:48:57 +0000 (17:48 +0000)
git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1663 b68d4a1b-bc3d-0410-92ed-d4ac073336b7

urjtag/ChangeLog
urjtag/src/bus/readmem.c

index cf8b328..4c7fc6d 100644 (file)
@@ -1,5 +1,7 @@
 2009-07-15  Arnim Laeuger  <arniml>
 
+  * src/bus/readmem.c: [ 2815739 ] Fix fwrite call (Jochen Friedrich)
+
   * src/bus/ejtag_dma.c: [ 2815726 ] Fix HALFWORD and BYTE DMA read access
     (Jochen Friedrich)
 
index 3af4505..6c76136 100644 (file)
@@ -119,7 +119,7 @@ urj_bus_readmem (urj_bus_t *bus, FILE *f, uint32_t addr, uint32_t len)
         {
             urj_log (URJ_LOG_LEVEL_NORMAL, _("addr: 0x%08llX\r"),
                      (long long unsigned) a);
-            if (fwrite (b, bc, 1, f) != bc)
+            if (fwrite (b, bc, 1, f) != 1)
             {
                 urj_error_set (URJ_ERROR_FILEIO, "fwrite fails");
                 urj_error_state.sys_errno = ferror(f);