firmware-utils: tplink-safeloader: compile as gnu99

Also fix minor coding style issue and one redeclaration.

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
This commit is contained in:
Alexander Couzens 2018-03-15 18:17:01 +01:00
parent 677d8df9b8
commit 3137622efb
No known key found for this signature in database
GPG key ID: C29E9DA6A0DF8604
2 changed files with 6 additions and 5 deletions

View file

@ -42,7 +42,7 @@ define Host/Compile
$(call cc,mkplanexfw sha1)
$(call cc,mktplinkfw mktplinkfw-lib md5, -Wall -fgnu89-inline)
$(call cc,mktplinkfw2 mktplinkfw-lib md5, -fgnu89-inline)
$(call cc,tplink-safeloader md5, -Wall)
$(call cc,tplink-safeloader md5, -Wall --std=gnu99)
$(call cc,pc1crypt)
$(call cc,osbridge-crc)
$(call cc,wrt400n cyg_crc32)

View file

@ -1417,8 +1417,9 @@ static int add_flash_partition(
unsigned long base,
unsigned long size)
{
int ptr;
/* check if the list has a free entry */
for (int ptr=0; ptr<max_entries; ptr++, part_list++) {
for (ptr = 0; ptr < max_entries; ptr++, part_list++) {
if (part_list->name == NULL &&
part_list->base == 0 &&
part_list->size == 0)