Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern es_arglen is already in bytes...
details: https://anonhg.NetBSD.org/src/rev/58f1264178f7
branches: trunk
changeset: 350892:58f1264178f7
user: christos <christos%NetBSD.org@localhost>
date: Wed Jan 25 17:57:14 2017 +0000
description:
es_arglen is already in bytes...
diffstat:
sys/kern/kern_exec.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diffs (46 lines):
diff -r f31f57d9db79 -r 58f1264178f7 sys/kern/kern_exec.c
--- a/sys/kern/kern_exec.c Wed Jan 25 17:56:45 2017 +0000
+++ b/sys/kern/kern_exec.c Wed Jan 25 17:57:14 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_exec.c,v 1.440 2017/01/09 00:31:30 kamil Exp $ */
+/* $NetBSD: kern_exec.c,v 1.441 2017/01/25 17:57:14 christos Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.440 2017/01/09 00:31:30 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.441 2017/01/25 17:57:14 christos Exp $");
#include "opt_exec.h"
#include "opt_execfmt.h"
@@ -1411,10 +1411,11 @@
data->ed_argc + /* char *argv[] */
1 + /* \0 */
data->ed_envc + /* char *env[] */
- 1 + /* \0 */
- epp->ep_esch->es_arglen; /* auxinfo */
-
- return (nargenvptrs * ptrsz(epp)) + argenvstrlen;
+ 1; /* \0 */
+
+ return (nargenvptrs * ptrsz(epp)) /* pointers */
+ + argenvstrlen /* strings */
+ + epp->ep_esch->es_arglen; /* auxinfo */
}
static size_t
@@ -1665,9 +1666,8 @@
argc + /* char *argv[] */
1 + /* \0 */
envc + /* char *env[] */
- 1 + /* \0 */
- /* XXX auxinfo multiplied by ptr size? */
- pack->ep_esch->es_arglen); /* auxinfo */
+ 1) + /* \0 */
+ pack->ep_esch->es_arglen; /* auxinfo */
sp = argp;
if ((error = copyout(&argc, cpp++, sizeof(argc))) != 0) {
Home |
Main Index |
Thread Index |
Old Index