[syslinux:master] com32/lib: add cast in __parse_argv()

syslinux-bot for H. Peter Anvin hpa at zytor.com
Sun Jan 10 13:24:05 PST 2010


Commit-ID:  c1a51d8ec6bbc7ff9105814d9bce6dae6ea2e005
Gitweb:     http://syslinux.zytor.com/commit/c1a51d8ec6bbc7ff9105814d9bce6dae6ea2e005
Author:     H. Peter Anvin <hpa at zytor.com>
AuthorDate: Sun, 10 Jan 2010 12:59:48 -0800
Committer:  H. Peter Anvin <hpa at zytor.com>
CommitDate: Sun, 10 Jan 2010 12:59:48 -0800

com32/lib: add cast in __parse_argv()

ALIGN_UP_FOR() returns the type of the original pointer, but we want
it to be the type that we're actually going to use.  Perhaps
ALIGN_UP_FOR() should be changed, but for now, just add the proper
cast.

Signed-off-by: H. Peter Anvin <hpa at zytor.com>


---
 com32/lib/sys/argv.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/com32/lib/sys/argv.c b/com32/lib/sys/argv.c
index b325f26..8e9aabd 100644
--- a/com32/lib/sys/argv.c
+++ b/com32/lib/sys/argv.c
@@ -75,7 +75,7 @@ int __parse_argv(char ***argv, const char *str)
     }
 
     /* Now create argv */
-    arg = ALIGN_UP_FOR(q, char *);
+    arg = (char **)ALIGN_UP_FOR(q, char *);
     *argv = arg;
     *arg++ = argv0;		/* argv[0] */
 



More information about the Syslinux-commits mailing list