diff options
author | Marc Schink <openocd-dev@marcschink.de> | 2015-10-04 17:18:40 +0200 |
---|---|---|
committer | Andreas Fritiofson <andreas.fritiofson@gmail.com> | 2016-02-29 21:04:47 +0000 |
commit | 73b676c2fdedcb913f1c20be7de99ea0a94b11cc (patch) | |
tree | 1b83325ff1fe0aef54d659c8b83378784347919a /src/flash/nor/lpc2900.c | |
parent | 7c957b601f7aeabc537519597057e63f2ae60320 (diff) | |
download | riscv-openocd-73b676c2fdedcb913f1c20be7de99ea0a94b11cc.zip riscv-openocd-73b676c2fdedcb913f1c20be7de99ea0a94b11cc.tar.gz riscv-openocd-73b676c2fdedcb913f1c20be7de99ea0a94b11cc.tar.bz2 |
helper/fileio: Remove nested struct
Change-Id: I1a3afbddcf950689da58e0df8850a05f558d7879
Signed-off-by: Marc Schink <openocd-dev@marcschink.de>
Reviewed-on: http://openocd.zylin.com/3222
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Diffstat (limited to 'src/flash/nor/lpc2900.c')
-rw-r--r-- | src/flash/nor/lpc2900.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/flash/nor/lpc2900.c b/src/flash/nor/lpc2900.c index 8868420..328232e 100644 --- a/src/flash/nor/lpc2900.c +++ b/src/flash/nor/lpc2900.c @@ -556,7 +556,7 @@ COMMAND_HANDLER(lpc2900_handle_read_custom_command) target_write_u32(target, FCTR, FCTR_FS_CS | FCTR_FS_WEB); /* Try and open the file */ - struct fileio fileio; + struct fileio *fileio; const char *filename = CMD_ARGV[1]; int ret = fileio_open(&fileio, filename, FILEIO_WRITE, FILEIO_BINARY); if (ret != ERROR_OK) { @@ -565,14 +565,14 @@ COMMAND_HANDLER(lpc2900_handle_read_custom_command) } size_t nwritten; - ret = fileio_write(&fileio, sizeof(customer), customer, &nwritten); + ret = fileio_write(fileio, sizeof(customer), customer, &nwritten); if (ret != ERROR_OK) { LOG_ERROR("Write operation to file %s failed", filename); - fileio_close(&fileio); + fileio_close(fileio); return ret; } - fileio_close(&fileio); + fileio_close(fileio); return ERROR_OK; } |