Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern do not assume that syscallarg(const char *) and (ch...



details:   https://anonhg.NetBSD.org/src/rev/06f1d41c6153
branches:  trunk
changeset: 344432:06f1d41c6153
user:      macallan <macallan%NetBSD.org@localhost>
date:      Mon Mar 28 15:45:18 2016 +0000

description:
do not assume that syscallarg(const char *) and (char *) are the same size
first step to make n32 kernels run binaries again

diffstat:

 sys/kern/init_main.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 6619b7712148 -r 06f1d41c6153 sys/kern/init_main.c
--- a/sys/kern/init_main.c      Mon Mar 28 15:20:16 2016 +0000
+++ b/sys/kern/init_main.c      Mon Mar 28 15:45:18 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: init_main.c,v 1.477 2015/12/08 20:36:15 christos Exp $ */
+/*     $NetBSD: init_main.c,v 1.478 2016/03/28 15:45:18 macallan Exp $ */
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.477 2015/12/08 20:36:15 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.478 2016/03/28 15:45:18 macallan Exp $");
 
 #include "opt_ddb.h"
 #include "opt_inet.h"
@@ -1035,7 +1035,7 @@
                 * Move out the arg pointers.
                 */
                ucp = (void *)STACK_ALIGN(ucp, STACK_ALIGNBYTES);
-               uap = (char **)STACK_ALLOC(ucp, sizeof(char *) * 3);
+               uap = (char **)STACK_ALLOC(ucp, sizeof(args));
                SCARG(&args, path) = arg0;
                SCARG(&args, argp) = uap;
                SCARG(&args, envp) = NULL;



Home | Main Index | Thread Index | Old Index