diff options
author | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-06-11 13:00:08 +0000 |
---|---|---|
committer | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-06-11 13:00:08 +0000 |
commit | 1b2c1c6ff0442bf954f39c39a4be3d00fc90987a (patch) | |
tree | 99db3be479ca6d70617c2455dedbcc91a313e5c2 | |
parent | 538050c146ea514b27657930e63a7f51e2a34c4c (diff) | |
download | openocd+libswd-1b2c1c6ff0442bf954f39c39a4be3d00fc90987a.tar.gz openocd+libswd-1b2c1c6ff0442bf954f39c39a4be3d00fc90987a.tar.bz2 openocd+libswd-1b2c1c6ff0442bf954f39c39a4be3d00fc90987a.tar.xz openocd+libswd-1b2c1c6ff0442bf954f39c39a4be3d00fc90987a.zip |
fix ordering of arguments to fwrite()
git-svn-id: svn://svn.berlios.de/openocd/trunk@2197 b42882b7-edfa-0310-969c-e2dbd0fdcd60
-rw-r--r-- | src/helper/ioutil.c | 2 | ||||
-rw-r--r-- | src/target/target.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/helper/ioutil.c b/src/helper/ioutil.c index 6be3e6cd..77e5e356 100644 --- a/src/helper/ioutil.c +++ b/src/helper/ioutil.c @@ -225,7 +225,7 @@ int handle_append_command(struct command_context_s *cmd_ctx, char *cmd, for (i = 1; i < argc; i++) { - if (fwrite(args[i], strlen(args[i]), 1, config_file)!=strlen(args[i])) + if (fwrite(args[i], 1, strlen(args[i]), config_file)!=strlen(args[i])) break; if (i != argc - 1) { diff --git a/src/target/target.c b/src/target/target.c index b7a4f3f8..6b8f3a0c 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -2623,7 +2623,7 @@ static int handle_virt2phys_command(command_context_t *cmd_ctx, static void writeData(FILE *f, const void *data, size_t len) { - size_t written = fwrite(data, len, 1, f); + size_t written = fwrite(data, 1, len, f); if (written != len) LOG_ERROR("failed to write %zu bytes: %s", len, strerror(errno)); } |