diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-08-28 09:11:20 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-08-28 09:11:20 -0600 |
commit | 0c9cc61c16109db3ae44af014243aac1cd5e5d66 (patch) | |
tree | 2421913392053362e054bebcfff826ff304c7113 /apps/system/install/install.c | |
parent | bdb25bba2e972cea6f46f0a5a3c760153549c2e1 (diff) | |
download | px4-nuttx-0c9cc61c16109db3ae44af014243aac1cd5e5d66.tar.gz px4-nuttx-0c9cc61c16109db3ae44af014243aac1cd5e5d66.tar.bz2 px4-nuttx-0c9cc61c16109db3ae44af014243aac1cd5e5d66.zip |
STM32 FLASH fixes: use size_t instead of uint16_t, make interface more generic. From Freddie Chopin
Diffstat (limited to 'apps/system/install/install.c')
-rw-r--r-- | apps/system/install/install.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/apps/system/install/install.c b/apps/system/install/install.c index 807744a7d..fe0c467f7 100644 --- a/apps/system/install/install.c +++ b/apps/system/install/install.c @@ -87,11 +87,11 @@ static const char *install_script_exec = static int install_getstartpage(int startpage, int pagemargin, int desiredsize) { - uint16_t page = 0, stpage = 0xffff; - uint16_t pagesize = 0; + size_t page = 0, stpage = 0xffff; + size_t pagesize = 0; int maxlen = -1; int maxlen_start = 0xffff; - int status; + ssize_t status; for (status=0, page=0; status >= 0; page++) { @@ -148,11 +148,11 @@ static int install_getstartpage(int startpage, int pagemargin, int desiredsize) static int install_programflash(int startaddr, const char *source) { - int status; - int count; - int totalsize = 0; - char *buf; - FILE *fp; + ssize_t status; + size_t count; + ssize_t totalsize = 0; + char *buf; + FILE *fp; if ((buf = malloc(INSTALL_PROGRAMBLOCKSIZE)) == NULL) { @@ -265,7 +265,7 @@ static int install_remove(const char *scriptname) { FILE *fp; int progsize, addr, freedsize; - uint16_t page; + ssize_t page; int status = 0; /* Parse script */ |