[syslinux] [PATCH 1/2] msg: VGAFilePtr should be char
Charles (Chas) Williams
3chas3 at gmail.com
Fri Aug 21 06:09:11 PDT 2015
VGAFilePtr is used as a pointer into VGAFileBuf, so it should be the
same type.
Signed-off-by: Chas Williams <ciwillia at brocade.com>
---
com32/elflink/ldlinux/msg.c | 4 ++--
core/graphics.c | 2 +-
core/include/graphics.h | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/com32/elflink/ldlinux/msg.c b/com32/elflink/ldlinux/msg.c
index 9ded33e..37cbe71 100644
--- a/com32/elflink/ldlinux/msg.c
+++ b/com32/elflink/ldlinux/msg.c
@@ -155,7 +155,7 @@ static void msg_filename(uint8_t data)
/* Ignore space/control char */
if (data > ' ') {
- if ((char *)VGAFilePtr < (VGAFileBuf + sizeof(VGAFileBuf)))
+ if (VGAFilePtr < (VGAFileBuf + sizeof(VGAFileBuf)))
*VGAFilePtr++ = data;
}
}
@@ -163,7 +163,7 @@ static void msg_filename(uint8_t data)
static void msg_vga(void)
{
NextCharJump = msg_filename;
- VGAFilePtr = (uint16_t *)VGAFileBuf;
+ VGAFilePtr = VGAFileBuf;
}
static void msg_normal(uint8_t data)
diff --git a/core/graphics.c b/core/graphics.c
index 834372f..1604ab4 100644
--- a/core/graphics.c
+++ b/core/graphics.c
@@ -27,9 +27,9 @@
__export uint8_t UsingVGA = 0;
uint16_t VGAPos; /* Pointer into VGA memory */
-__export uint16_t *VGAFilePtr; /* Pointer into VGAFileBuf */
__export uint16_t VGAFontSize = 16; /* Defaults to 16 byte font */
+__export char *VGAFilePtr; /* Pointer into VGAFileBuf */
__export char VGAFileBuf[VGA_FILE_BUF_SIZE]; /* Unmangled VGA image name */
__export char VGAFileMBuf[FILENAME_MAX]; /* Mangled VGA image name */
diff --git a/core/include/graphics.h b/core/include/graphics.h
index 814ffe7..65f4adc 100644
--- a/core/include/graphics.h
+++ b/core/include/graphics.h
@@ -41,7 +41,7 @@
extern uint8_t UsingVGA;
extern uint16_t VGAPos;
-extern uint16_t *VGAFilePtr;
+extern char *VGAFilePtr;
extern char VGAFileBuf[VGA_FILE_BUF_SIZE];
extern char VGAFileMBuf[];
extern uint16_t VGAFontSize;
--
2.1.0
More information about the Syslinux
mailing list