From 29fd062089967e352066087d9aade03599230e84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnim=20L=C3=A4uger?= Date: Wed, 15 Jul 2009 17:48:57 +0000 Subject: [PATCH] [ 2815739 ] Fix fwrite call (Jochen Friedrich) git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1663 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- urjtag/ChangeLog | 2 ++ urjtag/src/bus/readmem.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/urjtag/ChangeLog b/urjtag/ChangeLog index cf8b328a..4c7fc6d2 100644 --- a/urjtag/ChangeLog +++ b/urjtag/ChangeLog @@ -1,5 +1,7 @@ 2009-07-15 Arnim Laeuger + * 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) diff --git a/urjtag/src/bus/readmem.c b/urjtag/src/bus/readmem.c index 3af4505f..6c761361 100644 --- a/urjtag/src/bus/readmem.c +++ b/urjtag/src/bus/readmem.c @@ -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);