[syslinux:firmware] core: Change numIPAppends data type
syslinux-bot for Matt Fleming
matt.fleming at intel.com
Fri Nov 9 09:06:24 PST 2012
Commit-ID: b6b97c945d171aebc30510249a77581cd57fc8e7
Gitweb: http://www.syslinux.org/commit/b6b97c945d171aebc30510249a77581cd57fc8e7
Author: Matt Fleming <matt.fleming at intel.com>
AuthorDate: Thu, 2 Aug 2012 14:51:03 +0100
Committer: Matt Fleming <matt.fleming at intel.com>
CommitDate: Thu, 2 Aug 2012 14:51:03 +0100
core: Change numIPAppends data type
For EFI we don't have the opportunity to mess with the object type of
'numIPAppends' via assembly as is done for BIOS - we need to do it all
in C. So change numIPAppends to size_t to accurately reflect its use.
Without this change the loop in __syslinux_get_ipappend_strings()
actually uses the address of numIPAppends instead of any value stored
there because it's a char array.
Signed-off-by: Matt Fleming <matt.fleming at intel.com>
---
core/include/core.h | 2 +-
efi/main.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/core/include/core.h b/core/include/core.h
index c665d79..be687f8 100644
--- a/core/include/core.h
+++ b/core/include/core.h
@@ -36,7 +36,7 @@ extern unsigned int __bcopyxx_len;
extern uint8_t KbdMap[256];
extern const uint16_t IPAppends[];
-extern const char numIPAppends[];
+extern size_t numIPAppends;
extern uint16_t SerialPort;
extern uint16_t BaudDivisor;
diff --git a/efi/main.c b/efi/main.c
index f98d95c..379b475 100644
--- a/efi/main.c
+++ b/efi/main.c
@@ -81,7 +81,7 @@ void pxenv(void)
{
}
-const char numIPAppends[4];
+size_t numIPAppends = 0;
const uint16_t IPAppends[32];
uint16_t BIOS_fbm = 1;
far_ptr_t InitStack;
More information about the Syslinux-commits
mailing list