summaryrefslogtreecommitdiffstats
path: root/sys/kern/init_main.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1998-07-15 05:21:48 +0000
committerbde <bde@FreeBSD.org>1998-07-15 05:21:48 +0000
commit99afdcef51240ef47cc3fe2d137f0142c2f3899f (patch)
treece0520f1f747667beccaa44b100c3fa0aef2634c /sys/kern/init_main.c
parent6d175fbd76ecc6de2bcb284c1c2800b6803e0846 (diff)
downloadFreeBSD-src-99afdcef51240ef47cc3fe2d137f0142c2f3899f.zip
FreeBSD-src-99afdcef51240ef47cc3fe2d137f0142c2f3899f.tar.gz
Cast pointers to intptr_t instead of or before casting to long.
Fixed bitrot in K&R support (suword() now takes a long word). Didn't fix corresponding bitrot in store.9 and fetch.9. The correct types for the store and fetch families are problematic. The `word' functions are unfortunately named and need to be split to handle ints/longs/object pointers/function pointers. Storing argv[] as longs is quite broken when longs are longer than pointers, but usually works because it clobbers variables that will soon be reinitialized.
Diffstat (limited to 'sys/kern/init_main.c')
-rw-r--r--sys/kern/init_main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index ff5a0c5..c15e50a 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* @(#)init_main.c 8.9 (Berkeley) 1/21/94
- * $Id: init_main.c,v 1.93 1998/05/28 09:30:15 phk Exp $
+ * $Id: init_main.c,v 1.94 1998/06/07 17:11:32 dfr Exp $
*/
#include "opt_devfs.h"
@@ -605,10 +605,10 @@ start_init(p)
/*
* Move out the arg pointers.
*/
- uap = (char **)((long)ucp & ~(NBPW-1));
- (void)suword((caddr_t)--uap, 0); /* terminator */
- (void)suword((caddr_t)--uap, (long)arg1);
- (void)suword((caddr_t)--uap, (long)arg0);
+ uap = (char **)((intptr_t)ucp & ~(NBPW-1));
+ (void)suword((caddr_t)--uap, (long)0); /* terminator */
+ (void)suword((caddr_t)--uap, (long)(intptr_t)arg1);
+ (void)suword((caddr_t)--uap, (long)(intptr_t)arg0);
/*
* Point at the arguments.
OpenPOWER on IntegriCloud