aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2017-06-27 22:25:18 +0200
committerRon Yorston <rmy@pobox.com>2017-08-31 09:12:35 +0100
commit762ca54bfb34e47908a626d2f15632efd57aebf9 (patch)
tree361e1650187a75e6add38d3e45c5cba1ec1086f4
parentac96f9c265bae2d827e1933a6713d86920c0f159 (diff)
downloadbusybox-w32-762ca54bfb34e47908a626d2f15632efd57aebf9.tar.gz
busybox-w32-762ca54bfb34e47908a626d2f15632efd57aebf9.tar.bz2
busybox-w32-762ca54bfb34e47908a626d2f15632efd57aebf9.zip
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 <johannes.schindelin@gmx.de> Signed-off-by: Ron Yorston <rmy@pobox.com>
-rw-r--r--shell/ash.c6
1 files 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
15129forkshell_init(const char *idstr) 15129forkshell_init(const char *idstr)
15130{ 15130{
15131 struct forkshell *fs; 15131 struct forkshell *fs;
15132 int map_handle; 15132 void *map_handle;
15133 HANDLE h; 15133 HANDLE h;
15134 struct globals_var **gvpp; 15134 struct globals_var **gvpp;
15135 struct globals_misc **gmpp; 15135 struct globals_misc **gmpp;
15136 int i; 15136 int i;
15137 char **ptr; 15137 char **ptr;
15138 15138
15139 if (sscanf(idstr, "%x", &map_handle) != 1) 15139 if (sscanf(idstr, "%p", &map_handle) != 1)
15140 bb_error_msg_and_die("invalid forkshell ID"); 15140 bb_error_msg_and_die("invalid forkshell ID");
15141 15141
15142 h = (HANDLE)map_handle; 15142 h = (HANDLE)map_handle;
@@ -15163,7 +15163,7 @@ forkshell_init(const char *idstr)
15163 struct tblentry *e = fs->cmdtable[i]; 15163 struct tblentry *e = fs->cmdtable[i];
15164 while (e) { 15164 while (e) {
15165 if (e->cmdtype == CMDBUILTIN) 15165 if (e->cmdtype == CMDBUILTIN)
15166 e->param.cmd = builtintab + (int)e->param.cmd; 15166 e->param.cmd = builtintab + (int)(intptr_t)e->param.cmd;
15167 e = e->next; 15167 e = e->next;
15168 } 15168 }
15169 } 15169 }