summaryrefslogtreecommitdiff
path: root/src/helper/ioutil.c
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-11-10 00:02:18 -0800
committerZachary T Welch <zw@superlucidity.net>2009-11-13 10:55:27 -0800
commitd22270e0ed291d3b08fd03a25181b279ca5e0911 (patch)
treee9467fb7e4a05043d18eb747d0b4bfd89511abf1 /src/helper/ioutil.c
parenta585bdf7269ce5c861c83ee3294ba1f074e9c877 (diff)
downloadopenocd+libswd-d22270e0ed291d3b08fd03a25181b279ca5e0911.tar.gz
openocd+libswd-d22270e0ed291d3b08fd03a25181b279ca5e0911.tar.bz2
openocd+libswd-d22270e0ed291d3b08fd03a25181b279ca5e0911.tar.xz
openocd+libswd-d22270e0ed291d3b08fd03a25181b279ca5e0911.zip
command_handler_t: make argc unsigned
The number of command arguments will always be 0 or more, so use the right type in handlers. This has a cascading effect up through the layers, but the new COMMAND_HANDLER macros prevented total chaos.
Diffstat (limited to 'src/helper/ioutil.c')
-rw-r--r--src/helper/ioutil.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/helper/ioutil.c b/src/helper/ioutil.c
index 1423462c..3a629611 100644
--- a/src/helper/ioutil.c
+++ b/src/helper/ioutil.c
@@ -214,9 +214,9 @@ COMMAND_HANDLER(handle_append_command)
config_file = fopen(args[0], "a");
if (config_file != NULL)
{
- int i;
fseek(config_file, 0, SEEK_END);
+ unsigned i;
for (i = 1; i < argc; i++)
{
if (fwrite(args[i], 1, strlen(args[i]), config_file) != strlen(args[i]))