From 762ca54bfb34e47908a626d2f15632efd57aebf9 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 27 Jun 2017 22:25:18 +0200 Subject: ash: stop assuming that pointers and ints are interchangeable This is a companion patch to db169a143 (win32: ash: forkshell_init(), 2010-04-14). Signed-off-by: Johannes Schindelin Signed-off-by: Ron Yorston --- shell/ash.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shell/ash.c b/shell/ash.c index 5fd3bfb23..639f5396a 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -15129,14 +15129,14 @@ static void forkshell_init(const char *idstr) { struct forkshell *fs; - int map_handle; + void *map_handle; HANDLE h; struct globals_var **gvpp; struct globals_misc **gmpp; int i; char **ptr; - if (sscanf(idstr, "%x", &map_handle) != 1) + if (sscanf(idstr, "%p", &map_handle) != 1) bb_error_msg_and_die("invalid forkshell ID"); h = (HANDLE)map_handle; @@ -15163,7 +15163,7 @@ forkshell_init(const char *idstr) struct tblentry *e = fs->cmdtable[i]; while (e) { if (e->cmdtype == CMDBUILTIN) - e->param.cmd = builtintab + (int)e->param.cmd; + e->param.cmd = builtintab + (int)(intptr_t)e->param.cmd; e = e->next; } } -- cgit v1.2.3-55-g6feb